版本比较
Xzy的模板
正文
增加 27 行删除 18 行
14 行未改动151617181920192021222323242526272829303031323334356 行未改动4243444545464748494950505152535455565758596060616162636465662 行未改动6970717272737473747576777878798079808182828384858687888987889091929394959697989914 行未改动[字典树](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)
### 图
2 行未改动[最小生成树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) [扩展欧几里得(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/2fjg0zxv) [*LGV引理](https://www.luogu.com.cn/paste/ufguxa5e) [*prufer 序列](https://www.luogu.com.cn/paste/b6t0fnfw)