版本比较
Xzy的模板
正文
增加 33 行删除 28 行
1234556789105 行未改动161718191920202122232423252627282930313032333435366 行未改动43444546454748495049505152535455565758596061606162636465666566676867686970727374717273747576787980777879808283848586878881828384858687908889909192939495不是很熟的打上*号
[头文件](https://www.luogu.com.cn/paste/kenkr20w) [*快读](https://www.luogu.com.cn/paste/5npb402v) [文件操作](https://www.luogu.com.cn/paste/ms1153rt)[文件操作](https://www.luogu.com.cn/paste/ms1153rt) [快速模](https://www.luogu.com.cn/paste/jb95p1xn)### 算法[二分](https://www.luogu.com.cn/paste/bfu5q1uz) [整体二分](https://www.luogu.com.cn/paste/4il9zxq5) [四维偏序(cdq+cdq)](https://www.luogu.com.cn/paste/8fkeyune) 5 行未改动[字典树](https://www.luogu.com.cn/paste/0icghdwf) [最小表示法](https://www.luogu.com.cn/paste/s5h1h99l) [Z函数](https://www.luogu.com.cn/paste/j4txx07r) [AC自动机](https://www.luogu.com.cn/paste/5uf2dszi) [回文自动机](https://www.luogu.com.cn/paste/qem6xnbl) [后缀数组](https://www.luogu.com.cn/paste/6ma1bgzj)[*回文自动机](https://www.luogu.com.cn/paste/qem6xnbl) [*后缀数组](https://www.luogu.com.cn/paste/6ma1bgzj) [*后缀自动机](https://www.luogu.com.cn/paste/rfmskkcm)
### 动态规划[*斜率优化](https://www.luogu.com.cn/paste/dlzkx2mx) [斜率优化](https://www.luogu.com.cn/paste/dlzkx2mx) [*长链剖分优化](https://www.luogu.com.cn/paste/o3424qtf)
## 数据结构### 线性
[链表](https://www.luogu.com.cn/paste/iqlxcfci) [*带修莫队](https://www.luogu.com.cn/paste/757k3y82) [带修莫队](https://www.luogu.com.cn/paste/757k3y82) [*回滚莫队](https://www.luogu.com.cn/paste/omxh543h) [*树上莫队](https://www.luogu.com.cn/paste/basxxsyo) [*莫队二次离线](https://www.luogu.com.cn/paste/gxtqrebk)
6 行未改动[线段树分治](https://www.luogu.com.cn/paste/vdptjqfa) [树状数组套线段树](https://www.luogu.com.cn/paste/r67v2of1) [可持久化线段树](https://www.luogu.com.cn/paste/jwt9oo4d) [可持久化01trie](https://www.luogu.com.cn/paste/vue0xczm) [*线段树合并](https://www.luogu.com.cn/paste/2ju63pfu) [线段树合并](https://www.luogu.com.cn/paste/2ju63pfu) [*线段树分裂](https://www.luogu.com.cn/paste/d2mf7qhs) [*吉司机线段树(区间最值+区间历史最值)](https://www.luogu.com.cn/paste/ea3kiyvq) [*单侧递归线段树](https://www.luogu.com.cn/paste/xzc7bms4) [*李超线段树](https://www.luogu.com.cn/paste/nu0sif2d) [*K-D 树](https://www.luogu.com.cn/paste/bxvudla7) [李超线段树](https://www.luogu.com.cn/paste/nu0sif2d) [K-D 树](https://www.luogu.com.cn/paste/bxvudla7) [树的直径](https://www.luogu.com.cn/paste/6ze24mjw) [树的重心](https://www.luogu.com.cn/paste/wbzb3awo) [点分治](https://www.luogu.com.cn/paste/en4phk67) [长剖求祖先](https://www.luogu.com.cn/paste/qy8wv2fs) [LCA(重链剖分)](https://www.luogu.com.cn/paste/ukfcolok) [LCA(倍增)](https://www.luogu.com.cn/paste/3xgxfw3t) [*LCA(tarjan)](https://www.luogu.com.cn/paste/p584yo1a) [*LCA(dfs序)](https://www.luogu.com.cn/paste/bg6732ba) [*splay](https://www.luogu.com.cn/paste/a84qqmnd) [*FHQ treap](https://www.luogu.com.cn/paste/1ai91cmp) [*虚树](https://www.luogu.com.cn/paste/63rkz69i) [FHQ treap](https://www.luogu.com.cn/paste/1ai91cmp) [虚树](https://www.luogu.com.cn/paste/63rkz69i) [树上启发式合并](https://www.luogu.com.cn/paste/jmunwxz8)
### 图
[拓扑排序](https://www.luogu.com.cn/paste/cxi7t71d) [最短路](https://www.luogu.com.cn/paste/dtl8ktmd) [最小生成树Kruskal](https://www.luogu.com.cn/paste/05612fqg) [最小生成树Prim](https://www.luogu.com.cn/paste/kpll1y2d) [SCC tarjan](https://www.luogu.com.cn/paste/qcaj109w) [割点 tarjan](https://www.luogu.com.cn/paste/fi1hmt23) [*边双连通分量](https://www.luogu.com.cn/paste/z7lmtsrj) [*点双连通分量](https://www.luogu.com.cn/paste/h6dt5sm7) [*圆方树](https://www.luogu.com.cn/paste/f4mnlsjv) [边双连通分量](https://www.luogu.com.cn/paste/z7lmtsrj) [点双连通分量](https://www.luogu.com.cn/paste/h6dt5sm7) [圆方树](https://www.luogu.com.cn/paste/f4mnlsjv) [二分图最大匹配](https://www.luogu.com.cn/paste/hbis0gzi) [二分图最大权完美匹配KM(dfs)](https://www.luogu.com.cn/paste/rue9xmf5) [*二分图最大权完美匹配KM(bfs)](https://www.luogu.com.cn/paste/jlmnbu3j) [最大流EK](https://www.luogu.com.cn/paste/qpistsw5) [最大流Dinic](https://www.luogu.com.cn/paste/5c74uon0) [费用流Dinic](https://www.luogu.com.cn/paste/y3c55izs)[*最大流EK](https://www.luogu.com.cn/paste/qpistsw5) [*最大流Dinic](https://www.luogu.com.cn/paste/5c74uon0) [*费用流Dinic](https://www.luogu.com.cn/paste/y3c55izs)
## 数论[*康托展开](https://www.luogu.com.cn/paste/im4w84z6) [线性筛](https://www.luogu.com.cn/paste/879d1hca) [欧拉函数](https://www.luogu.com.cn/paste/9ankqopl) [*整除分块](https://www.luogu.com.cn/paste/cmnuahse) [*扩展欧几里得(exgcd)](https://www.luogu.com.cn/paste/wn2m0htq) [中国剩余定理CRT](https://www.luogu.com.cn/paste/pz14b5po) ## 数学
### 数论[*康托展开](https://www.luogu.com.cn/paste/im4w84z6) [扩展欧几里得(exgcd)](https://www.luogu.com.cn/paste/wn2m0htq) [*中国剩余定理CRT](https://www.luogu.com.cn/paste/pz14b5po) [*扩展中国剩余定理exCRT](https://www.luogu.com.cn/paste/qmza1ad4) [高斯消元](https://www.luogu.com.cn/paste/kxouqvvt)[高斯消元](https://www.luogu.com.cn/paste/kxouqvvt) [*扩展大步小步exBSGS](https://www.luogu.com.cn/paste/als4jskq)
### 组合与线代
[*矩阵树定理](https://www.luogu.com.cn/paste/2fjg0zxv) [*LGV引理](https://www.luogu.com.cn/paste/ufguxa5e) [*prufer 序列](https://www.luogu.com.cn/paste/b6t0fnfw)