摘要:
上午 考试了 $rank$再次倒数 下午 讲了一些关于矩阵乘法的东西 数学作业 $n \leq 1e18$一看数据范围,一点都不大,才$1e18$嘛 直接搞矩阵! 其实说实话这题我还是不太熟悉 先埋下一个坑 日后补上 大鳄鱼 对于这个题,我们首先简化问题,假如底下没有鳄鱼,问题就可以转化为,给你$n 阅读全文
posted @ 2020-07-23 17:46
Youngore
阅读(117)
评论(0)
推荐(1)
摘要:
上午 $cjh$学长讲课了,主要讲的动规 1.线性dp 典型例题 摆花 不会这个题$....!!!!!!$ 王八棋 四个$if$四个$for$ 注意计数器从$0$还是$1$开始的 2.背包(他没讲) 3.区间dp 典型例题 能量项链 石子合并 两个题几乎都一样 给出区间dp的板子: 初始化balba 阅读全文
posted @ 2020-07-23 17:26
Youngore
阅读(93)
评论(0)
推荐(1)
摘要:
题目 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
阅读(81)
评论(0)
推荐(0)
摘要:
给出完整的AC代码 这个题只需要写一个队列.... 枚举两个人可能选的坐标情况,作为不同的初始状态 对每个初始状态进行bfs搜索,得到木板上的每块草地被烧完的时间 其中烧完杯子耗时最久的时间就是总时间 然后根据此初始状态的耗时去更新答案 得到所有初始状态中耗时最小的时间 若无法更新得到,则输出-1 阅读全文
posted @ 2020-07-23 14:16
Youngore
阅读(69)
评论(0)
推荐(0)
摘要:
题目 今天没写完 晚上倒是有一段时间 不过我去弄Atom了...... 明天计划: 切掉这个题 把以前做过的搜索题复习一下 #include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespac 阅读全文
posted @ 2020-07-23 14:14
Youngore
阅读(65)
评论(0)
推荐(0)
摘要:
题目 这里很容易想到广搜,设初始状态为$(i,j)$,一共就只有六种变化 A杯倒满,B杯倒满,A杯倒出完,B杯倒出完,A到给B,B到给A 任意一种状态$i$ 或者 $j$达到 \(C\) 就停止,注意要打印路径,我这里用一个string存的操作顺序。 #include <iostream> #inc 阅读全文
posted @ 2020-07-23 14:12
Youngore
阅读(117)
评论(0)
推荐(1)
摘要:
题目 #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
阅读(72)
评论(0)
推荐(1)
摘要:
题目 // 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
阅读(52)
评论(0)
推荐(1)
摘要:
题目 #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
阅读(54)
评论(0)
推荐(1)
摘要:
题目 #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
阅读(55)
评论(0)
推荐(1)
摘要:
题目 // 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
阅读(64)
评论(0)
推荐(1)
摘要:
题目 #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
阅读(78)
评论(0)
推荐(1)
摘要:
题目 #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
阅读(79)
评论(0)
推荐(1)
摘要:
看到一些dalao写的不浅显易懂,我来补一发较为详细的代码 思想 1.有前缀和的思想 即,我们在$b$那个位置,求出一个1到$b$区间的数目 然后在 $a-1$那里,进行同样的操作,进行运算, 最后的答案就是solve(b) - solve(a-1) 2.这道题是一个数位DP 通常数字都很大,我们可 阅读全文
posted @ 2020-07-23 12:26
Youngore
阅读(216)
评论(0)
推荐(1)
摘要:
今天考试了, 考了好几道题 依次为: 矩阵乘法 代码: #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
阅读(122)
评论(0)
推荐(1)
摘要:
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
阅读(111)
评论(0)
推荐(1)
摘要:
对于“同余方程”“扩展欧几里得”“贝祖定理”“乘法逆元”以及“费马小定理” 同余方程 只是一个方程,形如$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
阅读(103)
评论(0)
推荐(1)
摘要:
#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
阅读(184)
评论(0)
推荐(1)
摘要:
// 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
阅读(199)
评论(0)
推荐(1)
摘要:
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
阅读(110)
评论(0)
推荐(1)
摘要:
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
阅读(71)
评论(0)
推荐(1)
摘要:
关于存图方式常用的有两种 第一种 邻接矩阵 直接暴力存图 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
阅读(170)
评论(0)
推荐(1)

浙公网安备 33010602011771号