Loading...

07 2020 档案

摘要:改题 补坑 写博客 阅读全文
posted @ 2020-07-31 15:04 Youngore
摘要:#上午 第一题 巧克力 这题某谷数据水,$int$就过了,因为以前做过,所以这次理所当然的切了 切了之后我还仔细查看是否需要LL,检查无误后,没开LL 但是教练的数据强,卡我50分,上次因为LL卡我100分 出题人学长Youngsc的题是真的强..... 这题贪心做,把权值从小到大排序,排完之后干就 阅读全文
posted @ 2020-07-30 11:23 Youngore
摘要:上午 (睡觉ing) 主要也就是讲了数据结构 讲了树状数组,线段树的相关操作(貌似没有提到分块) ###单改区查 click 秒切 ###区改单查 click 搞个差分数组,还是切 区改区查 click 推式子.... p的前缀和=\begin\sum_^p a[i] = \sum_^p\sum_^ 阅读全文
posted @ 2020-07-29 11:54 Youngore
摘要:#上午 教练让补补坑 先改了改以前的题,然后开始透彻几道题 1.滑稽窗口 以前总是感觉迷迷糊糊不太透彻,今天tmd终于搞明白了 我们维护一个希望维护一个长度为m的队列,对于求最小值的时候,我们维护单增队列,所以队尾一定要保证是最大的 所以对于当前的$a[i]$,我们必须保证$a[i] > a[q[t 阅读全文
posted @ 2020-07-28 11:10 Youngore
摘要:博客已搬家 新博客:click,自2020.09.24之后停止更新 我是$youngore$ 一名来自$HE$的$OIer$ 欢迎你光顾博客! 阅读全文
posted @ 2020-07-28 09:27 Youngore
摘要:#上午 讲了搜索,最短路,最小生成树 关于搜索 首先是bfs一些走迷宫问题 基本框架如下: 1.入队,打上标记 2.队列不空{ 取出当前队首节点,接近着pop 一般都是对队首枚举四个方向{ 对于每个方向拓展出来的点 进行一大堆特判 留下经过挑选的数 { 入队 打上标记 } } } 3.善后 一般而言 阅读全文
posted @ 2020-07-28 06:54 Youngore
摘要:#上午 考试 #下午 讲题讲课 以下有的东西是粘的 同余定理 若$a % b == c % b$, 我们称之为$a\equiv c (\mod b)$ 在四则运算中,我们需要知道 在做题时,我们经常会遇到对一个数取模的运算 我们需要知道 \((a+b)\%c=((a\%c)+(b\%c))\%c\) 阅读全文
posted @ 2020-07-26 21:35 Youngore
摘要:#上午 讲了AC自动机 甩个链接日后补坑 WA自动机 思想也懂 但是有些细节和坑点没有排雷,代码实现是有问题的 #下午 讲了他娘的一下午Vim 听得老子一脸懵逼 都他妈的是啥啊,麻烦死了 还是dev好用 #晚上 一晚上的dp 区间dp做了两道以前做过的,并且做了一道新的,这道新的,自己把式子推出来了 阅读全文
posted @ 2020-07-25 21:36 Youngore
摘要:上午 考试了 $rank$再次倒数 下午 讲了一些关于矩阵乘法的东西 数学作业 $n \leq 1e18$一看数据范围,一点都不大,才$1e18$嘛 直接搞矩阵! 其实说实话这题我还是不太熟悉 先埋下一个坑 日后补上 大鳄鱼 对于这个题,我们首先简化问题,假如底下没有鳄鱼,问题就可以转化为,给你$n 阅读全文
posted @ 2020-07-23 17:46 Youngore
摘要:上午 $cjh$学长讲课了,主要讲的动规 1.线性dp 典型例题 摆花 不会这个题$....!!!!!!$ 王八棋 四个$if$四个$for$ 注意计数器从$0$还是$1$开始的 2.背包(他没讲) 3.区间dp 典型例题 能量项链 石子合并 两个题几乎都一样 给出区间dp的板子: 初始化balba 阅读全文
posted @ 2020-07-23 17:26 Youngore
摘要:题目 thought: 1.make two queue, one is for J, another is for F 2.first update the J,and then uodate the F the code is follow: #include <bits/stdc++.h> u 阅读全文
posted @ 2020-07-23 14:17 Youngore
摘要:给出完整的AC代码 这个题只需要写一个队列.... 枚举两个人可能选的坐标情况,作为不同的初始状态 对每个初始状态进行bfs搜索,得到木板上的每块草地被烧完的时间 其中烧完杯子耗时最久的时间就是总时间 然后根据此初始状态的耗时去更新答案 得到所有初始状态中耗时最小的时间 若无法更新得到,则输出-1 阅读全文
posted @ 2020-07-23 14:16 Youngore
摘要:题目 今天没写完 晚上倒是有一段时间 不过我去弄Atom了...... 明天计划: 切掉这个题 把以前做过的搜索题复习一下 #include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespac 阅读全文
posted @ 2020-07-23 14:14 Youngore
摘要:题目 这里很容易想到广搜,设初始状态为$(i,j)$,一共就只有六种变化 A杯倒满,B杯倒满,A杯倒出完,B杯倒出完,A到给B,B到给A 任意一种状态$i$ 或者 $j$达到 \(C\) 就停止,注意要打印路径,我这里用一个string存的操作顺序。 #include <iostream> #inc 阅读全文
posted @ 2020-07-23 14:12 Youngore
摘要:题目 #include <iostream> #include <cstdio> using namespace std; const int N = 1e4+66, INF = 250; int T, res, len; int a, b, i, dy; char p[N], t[N], s[N] 阅读全文
posted @ 2020-07-23 14:11 Youngore
摘要:题目 // Prime Path #include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; const int N = 10000+10; const int INF 阅读全文
posted @ 2020-07-23 14:09 Youngore
摘要:题目 #include <cstdio> #include <iostream> #define ull unsigned long long int using namespace std; int n, k; inline void dfs (ull ans, int n, int weishu 阅读全文
posted @ 2020-07-23 14:08 Youngore
摘要:题目 #include <cstdio> #include <iostream> #include <cstring> using namespace std; const int N = 66, INF = 2147483647; int n, m, res = INF; int f[N]; in 阅读全文
posted @ 2020-07-23 14:07 Youngore
摘要:题目 // catch that cow #include <iostream> using namespace std; const int N = 1e7+10; int n, k, x; int q[N], v[N], dis[N]; int main () { cin >> n >> k; 阅读全文
posted @ 2020-07-23 14:06 Youngore
摘要:题目 #include <iostream> #include <cstring> #include <queue> #define N 110 using namespace std; int l, r, c, sx, sy, sz; char a[N][N][N]; int vis[N][N][ 阅读全文
posted @ 2020-07-23 14:04 Youngore
摘要:题目 #include <cstdio> #include <iostream> #include <cstring> #define INF 214474444 using namespace std; int n, k, tot, stp; int a[10][10], vis[10]; cha 阅读全文
posted @ 2020-07-23 14:03 Youngore
摘要:看到一些dalao写的不浅显易懂,我来补一发较为详细的代码 思想 1.有前缀和的思想 即,我们在$b$那个位置,求出一个1到$b$区间的数目 然后在 $a-1$那里,进行同样的操作,进行运算, 最后的答案就是solve(b) - solve(a-1) 2.这道题是一个数位DP 通常数字都很大,我们可 阅读全文
posted @ 2020-07-23 12:26 Youngore
摘要:今天考试了, 考了好几道题 依次为: 矩阵乘法 代码: #include <bits/stdc++.h> #define int long long using namespace std; const int N = 502, mod = 1e9+7; int n, p, m; int f1[N] 阅读全文
posted @ 2020-07-23 12:24 Youngore
摘要:There is three topics first is square the topic is a \(dfs\) we search the any point into any square the 'in' function is to judge the point whether i 阅读全文
posted @ 2020-07-23 12:23 Youngore
摘要:对于“同余方程”“扩展欧几里得”“贝祖定理”“乘法逆元”以及“费马小定理” 同余方程 只是一个方程,形如$a\times x\equiv c \pmod b$ 扩展欧几里得 是求解形如 $a\times x+b\times y= \gcd(a,b)$的$x,y$的解 贝祖定理 对于数$a,b$ 一定 阅读全文
posted @ 2020-07-23 12:22 Youngore
摘要:#include <cstdio> #include <iostream> using namespace std; const int N = 1e5+2; struct Splay { struct node { node *ch[2], *fa; int val, size; node (no 阅读全文
posted @ 2020-07-23 12:21 Youngore
摘要:// eft #include <bits/stdc++.h> using namespace std; const int N = 1e4+100; int n, m, t, res; int vis[N], mch[N]; struct Edge {int frm, to, nxt;}e[N<< 阅读全文
posted @ 2020-07-23 12:20 Youngore
摘要:the easy xds code is follow: #include <cstdio> #include <iostream> #define int long long int using namespace std; const int N = 1e5+10; int n, m; int 阅读全文
posted @ 2020-07-23 12:19 Youngore
摘要:Single point modification, interval query the code is follow #include <cstdio> #include <iostream> #define lowbit(x) x&-x using namespace std; const i 阅读全文
posted @ 2020-07-23 12:18 Youngore
摘要:关于存图方式常用的有两种 第一种 邻接矩阵 直接暴力存图 int u, v, w; cin >> u >> v >> w; a[u][v] = w; 即意为在$u$与$v$之间连上一条权值为$w$的边 也可以借助$vector$来存储,但是$vector$容易被卡,不建议用 vector<int>q 阅读全文
posted @ 2020-07-23 12:17 Youngore