Loading...

随笔分类 -  学后感

摘要:插头dp 俗称轮廓线dp, 各种网格覆盖问题,范围允许状压解决,常用于计算方案数与联通块权值 插头是tm啥?格子与格子之间的状态 网上图很多,不挂了 说一说对各种状态的理解 已知$b1,b2$ 当前有障碍的话,显然不能走 只讨论没有障碍,能走的情况 \(b1 = 0,b2 =0\) 增加两个插头,要 阅读全文
posted @ 2020-09-04 21:25 Youngore
摘要:今天学了博弈论 必胜态与必败态 必败态: 我的后继状态全是必胜态 无论我如何选择我的对手都将会面临必胜态,我显然必输 我没有后继状态 默认谁不能拿谁输,我已经不能拿了,我显然输了 必胜态: 我的后继状态有一个是必败态,我就为必胜态 因为大家都是绝顶聪明的,我肯定会选择使我的后继状态变为必败态(我的对 阅读全文
posted @ 2020-09-02 15:02 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