随笔分类 -  模板

摘要:const int MaxLct = 2 * 1e5; #define ls(p) (Tr[p].ch[0]) #define rs(p) (Tr[p].ch[1]) #define fa(p) (Tr[p].fa) #define rev(p) (Tr[p].rev) struct Node { 阅读全文
posted @ 2022-03-11 21:11 C2022lihan 阅读(14) 评论(0) 推荐(0) 编辑
摘要:const int Maxn = 1e6; const int Maxkind = 26; struct Ac_Automata { int cnt; int End[Maxn + 5]; int Tire[Maxkind + 5][Maxn + 5]; int dout[Maxn + 5]; vo 阅读全文
posted @ 2022-01-23 14:29 C2022lihan 阅读(19) 评论(0) 推荐(0) 编辑
摘要:const int Maxn = 1e4; const int Maxm = 1e5; const int Maxq = 1e7; const LL Limit = 1e14; const LL Inf = 0x3f3f3f3f3f3f3f; struct Date { int x, y; LL f 阅读全文
posted @ 2022-01-04 15:11 C2022lihan 阅读(15) 评论(0) 推荐(0) 编辑
摘要:const int Maxn = 1e5 + 5; const LL Mod = 998244353; struct Cantor { int n; int c[Maxn], BIT[Maxn], Bit[Maxn]; LL order, fac[Maxn]; Cantor () { memset 阅读全文
posted @ 2021-02-05 09:41 C2022lihan 阅读(12) 评论(0) 推荐(0) 编辑
摘要:1.压位(比较简单) const int up = 10; const int M = 1000; struct High { int c[up + 5]; void out () { int poi = up; while (poi >= 1 && c[poi] == 0) poi--; writ 阅读全文
posted @ 2020-12-08 20:58 C2022lihan 阅读(7) 评论(0) 推荐(0) 编辑
摘要:1.树上倍增 #include <queue> #include <cstdio> using namespace std; const int MAXN = 1e5 + 5; const int MAXTEP = 45; int n, m; int depth[MAXN], f[MAXN][MAX 阅读全文
posted @ 2020-12-04 12:40 C2022lihan 阅读(6) 评论(0) 推荐(0) 编辑
摘要:矩阵 1.乘法 struct Matrix { int n, m; LL c[Maxn + 5][Maxn + 5]; Matrix () { memset (c, 0, sizeof c); } void Init () { memset (c, 0, sizeof c); for (int i 阅读全文
posted @ 2020-10-07 19:39 C2022lihan 阅读(23) 评论(0) 推荐(0) 编辑
摘要:离散化 逆序对 树状数组 堆 快读快输 最短路 最小生成树 背包 矩阵 分数 筛素数 各种类型的小球问题 扩展欧几里得 逆元 KMP LCA 高精度 康托&康托逆展开 分块 二次项展开(矩阵加速) 连通分量 高斯消元模板 pbds 有源汇上下界的最小/大流 网络流 最大流 ac自动机模板 后缀数组模 阅读全文
posted @ 2020-07-26 20:13 C2022lihan 阅读(16) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示