模板大全
题单介绍
- [B3614 【模板】栈](https://www.luogu.com.cn/problem/B3614)
- [P10216 【模板】Pfaffian](https://www.luogu.com.cn/problem/P10216)
- [P3805 【模板】manacher](https://www.luogu.com.cn/problem/P3805)
- [P6656 【模板】Runs](https://www.luogu.com.cn/problem/P6656)
- [P3375 【模板】KMP](https://www.luogu.com.cn/problem/P3375)
- [B3647 【模板】Floyd](https://www.luogu.com.cn/problem/B3647)
- [P3378 【模板】堆](https://www.luogu.com.cn/problem/P3378)
- [B3616 【模板】队列](https://www.luogu.com.cn/problem/B3616)
- [P1177 【模板】排序](https://www.luogu.com.cn/problem/P1177)
- [P6091 【模板】原根](https://www.luogu.com.cn/problem/P6091)
- [P3387 【模板】缩点](https://www.luogu.com.cn/problem/P3387)
- [P3385 【模板】负环](https://www.luogu.com.cn/problem/P3385)
- [P4782 【模板】2-SAT](https://www.luogu.com.cn/problem/P4782)
- [P5632 【模板】Stoer-Wagner](https://www.luogu.com.cn/problem/P5632)
- [P4718 【模板】Pollard-Rho](https://www.luogu.com.cn/problem/P4718)
- [P7884 【模板】Meissel-Lehmer](https://www.luogu.com.cn/problem/P7884)
- [P6114 【模板】Lyndon 分解](https://www.luogu.com.cn/problem/P6114)
- [P1226 【模板】快速幂](https://www.luogu.com.cn/problem/P1226)
- [P6086 【模板】Prufer 序列](https://www.luogu.com.cn/problem/P6086)
- [P8306 【模板】字典树](https://www.luogu.com.cn/problem/P8306)
- [P3812 【模板】线性基](https://www.luogu.com.cn/problem/P3812)
- [P6657 【模板】LGV 引理](https://www.luogu.com.cn/problem/P6657)
- [P4980 【模板】Polya 定理](https://www.luogu.com.cn/problem/P4980)
- [P2197 【模板】Nim 游戏](https://www.luogu.com.cn/problem/P2197)
- [P5180 【模板】支配树](https://www.luogu.com.cn/problem/P5180)
- [P5056 【模板】插头 DP](https://www.luogu.com.cn/problem/P5056)
- [P4721 【模板】分治 FFT](https://www.luogu.com.cn/problem/P4721)
- [P5788 【模板】单调栈](https://www.luogu.com.cn/problem/P5788)
- [P5829 【模板】失配树](https://www.luogu.com.cn/problem/P5829)
- [P5325 【模板】Min_25 筛](https://www.luogu.com.cn/problem/P5325)
- [P4213 【模板】杜教筛](https://www.luogu.com.cn/problem/P4213)
- [P3367 【模板】并查集](https://www.luogu.com.cn/problem/P3367)
- [P3380 【模板】树套树](https://www.luogu.com.cn/problem/P3380)
- [P3809 【模板】后缀排序](https://www.luogu.com.cn/problem/P3809)
- [P6097 【模板】子集卷积](https://www.luogu.com.cn/problem/P6097)
- [P6115 【模板】整式递推](https://www.luogu.com.cn/problem/P6115)
- [P6800 【模板】Chirp Z-Transform](https://www.luogu.com.cn/problem/P6800)
- [P5854 【模板】笛卡尔树](https://www.luogu.com.cn/problem/P5854)
- [P5495 【模板】Dirichlet 前缀和](https://www.luogu.com.cn/problem/P5495)
- [P5367 【模板】康托展开](https://www.luogu.com.cn/problem/P5367)
- [P5960 【模板】差分约束](https://www.luogu.com.cn/problem/P5960)
- [B3611 【模板】传递闭包](https://www.luogu.com.cn/problem/B3611)
- [P4929 【模板】舞蹈链(DLX)](https://www.luogu.com.cn/problem/P4929)
- [P7771 【模板】欧拉路径](https://www.luogu.com.cn/problem/P7771)
- [P10815 【模板】快速读入](https://www.luogu.com.cn/problem/P10815)
- [P3372 【模板】线段树 1](https://www.luogu.com.cn/problem/P3372)
- [P4195 【模板】扩展 BSGS/exBSGS](https://www.luogu.com.cn/problem/P4195)
- [P4783 【模板】矩阵求逆](https://www.luogu.com.cn/problem/P4783)
- [P5487 【模板】Berlekamp–Massey 算法](https://www.luogu.com.cn/problem/P5487)
- [P3373 【模板】线段树 2](https://www.luogu.com.cn/problem/P3373)
- [P4549 【模板】裴蜀定理](https://www.luogu.com.cn/problem/P4549)
- [P3690 【模板】动态树(LCT)](https://www.luogu.com.cn/problem/P3690)
- [P3806 【模板】点分治 1](https://www.luogu.com.cn/problem/P3806)
- [P5668 【模板】N 次剩余](https://www.luogu.com.cn/problem/P5668)
- [P5357 【模板】AC 自动机](https://www.luogu.com.cn/problem/P5357)
- [P5491 【模板】二次剩余](https://www.luogu.com.cn/problem/P5491)
- [P6178 【模板】Matrix-Tree 定理](https://www.luogu.com.cn/problem/P6178)
- [P3388 【模板】割点(割顶)](https://www.luogu.com.cn/problem/P3388)
- [P1883 【模板】三分 | 函数](https://www.luogu.com.cn/problem/P1883)
- [P5494 【模板】线段树分裂](https://www.luogu.com.cn/problem/P5494)
- [P3369 【模板】普通平衡树](https://www.luogu.com.cn/problem/P3369)
- [P3374 【模板】树状数组 1](https://www.luogu.com.cn/problem/P3374)
- [P1368 【模板】最小表示法](https://www.luogu.com.cn/problem/P1368)
- [P3383 【模板】线性筛素数](https://www.luogu.com.cn/problem/P3383)
- [P3368 【模板】树状数组 2](https://www.luogu.com.cn/problem/P3368)
- [P6164 【模板】后缀平衡树](https://www.luogu.com.cn/problem/P6164)
- [P3376 【模板】网络最大流](https://www.luogu.com.cn/problem/P3376)
- [P3391 【模板】文艺平衡树](https://www.luogu.com.cn/problem/P3391)
- [P3390 【模板】矩阵快速幂](https://www.luogu.com.cn/problem/P3390)
- [P4724 【模板】三维凸包](https://www.luogu.com.cn/problem/P4724)
- [P5236 【模板】静态仙人掌](https://www.luogu.com.cn/problem/P5236)
- [P6329 【模板】点分树 | 震波](https://www.luogu.com.cn/problem/P6329)
- [B3656 【模板】双端队列 1](https://www.luogu.com.cn/problem/B3656)
- [P7776 【模板】特征多项式](https://www.luogu.com.cn/problem/P7776)
- [P7112 【模板】行列式求值](https://www.luogu.com.cn/problem/P7112)
- [P4512 【模板】多项式除法](https://www.luogu.com.cn/problem/P4512)
- [P3366 【模板】最小生成树](https://www.luogu.com.cn/problem/P3366)
- [P3389 【模板】高斯消元法](https://www.luogu.com.cn/problem/P3389)
- [P3865 【模板】ST 表 && RMQ 问题](https://www.luogu.com.cn/problem/P3865)
- [P3370 【模板】字符串哈希](https://www.luogu.com.cn/problem/P3370)
- [P5282 【模板】快速阶乘算法](https://www.luogu.com.cn/problem/P5282)
- [P2613 【模板】有理数取余](https://www.luogu.com.cn/problem/P2613)
- [P4716 【模板】最小树形图](https://www.luogu.com.cn/problem/P4716)
- [P5205 【模板】多项式开根](https://www.luogu.com.cn/problem/P5205)
- [P5903 【模板】树上 K 级祖先](https://www.luogu.com.cn/problem/P5903)
- [P5807 【模板】BEST 定理 | Which Dreamed It](https://www.luogu.com.cn/problem/P5807)
- [P6192 【模板】最小斯坦纳树](https://www.luogu.com.cn/problem/P6192)
- [P5091 【模板】扩展欧拉定理](https://www.luogu.com.cn/problem/P5091)
- [P4238 【模板】多项式乘法逆](https://www.luogu.com.cn/problem/P4238)
- [P5245 【模板】多项式快速幂](https://www.luogu.com.cn/problem/P5245)
- [P5496 【模板】回文自动机(PAM)](https://www.luogu.com.cn/problem/P5496)
- [P3377 【模板】左偏树/可并堆](https://www.luogu.com.cn/problem/P3377)
- [P8436 【模板】边双连通分量](https://www.luogu.com.cn/problem/P8436)
- [P3811 【模板】模意义下的乘法逆元](https://www.luogu.com.cn/problem/P3811)
- [P3804 【模板】后缀自动机(SAM)](https://www.luogu.com.cn/problem/P3804)
- [P5809 【模板】多项式复合逆](https://www.luogu.com.cn/problem/P5809)
- [P5826 【模板】子序列自动机](https://www.luogu.com.cn/problem/P5826)
- [P5905 【模板】全源最短路(Johnson)](https://www.luogu.com.cn/problem/P5905)
- [P10814 【模板】离线二维数点](https://www.luogu.com.cn/problem/P10814)
- [P8435 【模板】点双连通分量](https://www.luogu.com.cn/problem/P8435)
- [P3803 【模板】多项式乘法(FFT)](https://www.luogu.com.cn/problem/P3803)
- [P4245 【模板】任意模数多项式乘法](https://www.luogu.com.cn/problem/P4245)
- [P3379 【模板】最近公共祖先(LCA)](https://www.luogu.com.cn/problem/P3379)
- [B3644 【模板】拓扑排序 / 家谱树](https://www.luogu.com.cn/problem/B3644)
- [P5170 【模板】类欧几里得算法](https://www.luogu.com.cn/problem/P5170)
- [P4781 【模板】拉格朗日插值](https://www.luogu.com.cn/problem/P4781)
- [P5247 【模板】动态图连通性](https://www.luogu.com.cn/problem/P5247)
- [P3381 【模板】最小费用最大流](https://www.luogu.com.cn/problem/P3381)
- [P1886 滑动窗口 /【模板】单调队列](https://www.luogu.com.cn/problem/P1886)
- [P5050 【模板】多项式多点求值](https://www.luogu.com.cn/problem/P5050)
- [P3835 【模板】可持久化平衡树](https://www.luogu.com.cn/problem/P3835)
- [P5373 【模板】多项式复合函数](https://www.luogu.com.cn/problem/P5373)
- [P1439 【模板】最长公共子序列](https://www.luogu.com.cn/problem/P1439)
- [P5410 【模板】扩展 KMP/exKMP(Z 函数)](https://www.luogu.com.cn/problem/P5410)
- [P5431 【模板】模意义下的乘法逆元 2](https://www.luogu.com.cn/problem/P5431)
- [P7173 【模板】有负圈的费用流](https://www.luogu.com.cn/problem/P7173)
- [P6113 【模板】一般图最大匹配](https://www.luogu.com.cn/problem/P6113)
- [P3386 【模板】二分图最大匹配](https://www.luogu.com.cn/problem/P3386)
- [P5158 【模板】多项式快速插值](https://www.luogu.com.cn/problem/P5158)
- [P4719 【模板】"动态 DP"&动态树分治](https://www.luogu.com.cn/problem/P4719)
- [P4526 【模板】自适应辛普森法 2](https://www.luogu.com.cn/problem/P4526)
- [P5490 【模板】扫描线 & 矩形面积并](https://www.luogu.com.cn/problem/P5490)
- [P4525 【模板】自适应辛普森法 1](https://www.luogu.com.cn/problem/P4525)
- [P4720 【模板】扩展卢卡斯定理/exLucas](https://www.luogu.com.cn/problem/P4720)
- [P3807 【模板】卢卡斯定理/Lucas 定理](https://www.luogu.com.cn/problem/P3807)
- [P4897 【模板】最小割树(Gomory-Hu Tree)](https://www.luogu.com.cn/problem/P4897)
- [P3846 [TJOI2007] 可爱的质数/【模板】BSGS](https://www.luogu.com.cn/problem/P3846)
- [P5394 【模板】下降幂多项式乘法](https://www.luogu.com.cn/problem/P5394)
- [P6177 Count on a tree II/【模板】树分块](https://www.luogu.com.cn/problem/P6177)
- [P3834 【模板】可持久化线段树 2](https://www.luogu.com.cn/problem/P3834)
- [P4777 【模板】扩展中国剩余定理(EXCRT)](https://www.luogu.com.cn/problem/P4777)
- [P4097 【模板】李超线段树 / [HEOI2013] Segment](https://www.luogu.com.cn/problem/P4097)
- [P5787 二分图 /【模板】线段树分治](https://www.luogu.com.cn/problem/P5787)
- [P6699 【模板】一般图最大权匹配](https://www.luogu.com.cn/problem/P6699)
- [P3810 【模板】三维偏序(陌上花开)](https://www.luogu.com.cn/problem/P3810)
- [P5055 【模板】可持久化文艺平衡树](https://www.luogu.com.cn/problem/P5055)
- [P4723 【模板】常系数齐次线性递推](https://www.luogu.com.cn/problem/P4723)
- [P5043 【模板】树同构([BJOI2015]树的同构)](https://www.luogu.com.cn/problem/P5043)
- [P5277 【模板】多项式开根(加强版)](https://www.luogu.com.cn/problem/P5277)
- [P3384 【模板】重链剖分/树链剖分](https://www.luogu.com.cn/problem/P3384)
- [P3371 【模板】单源最短路径(弱化版)](https://www.luogu.com.cn/problem/P3371)
- [P1452 【模板】旋转卡壳 | [USACO03FALL] Beauty Contest G](https://www.luogu.com.cn/problem/P1452)
- [P5906 【模板】回滚莫队&不删除莫队](https://www.luogu.com.cn/problem/P5906)
- [P2483 【模板】k 短路 / [SDOI2010] 魔法猪学院](https://www.luogu.com.cn/problem/P2483)
- [P5273 【模板】多项式幂函数(加强版)](https://www.luogu.com.cn/problem/P5273)
- [P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779)
- [P6136 【模板】普通平衡树(数据加强版)](https://www.luogu.com.cn/problem/P6136)
- [P6139 【模板】广义后缀自动机(广义 SAM)](https://www.luogu.com.cn/problem/P6139)
- [P5808 【模板】常系数非齐次线性递推](https://www.luogu.com.cn/problem/P5808)
- [P1495 【模板】中国剩余定理(CRT)/ 曹冲养猪](https://www.luogu.com.cn/problem/P1495)
- [P6242 【模板】线段树 3(区间最值操作、区间历史最值)](https://www.luogu.com.cn/problem/P6242)
- [P4887 【模板】莫队二次离线(第十四分块(前体))](https://www.luogu.com.cn/problem/P4887)
- [P3919 【模板】可持久化线段树 1(可持久化数组)](https://www.luogu.com.cn/problem/P3919)
- [P4717 【模板】快速莫比乌斯/沃尔什变换 (FMT/FWT)](https://www.luogu.com.cn/problem/P4717)
- [P4556 [Vani有约会] 雨天的尾巴 /【模板】线段树合并](https://www.luogu.com.cn/problem/P4556)
- [P2742 [USACO5.1] 圈奶牛Fencing the Cows /【模板】二维凸包](https://www.luogu.com.cn/problem/P2742)
- [P11175 【模板】基于值域预处理的快速离散对数](https://www.luogu.com.cn/problem/P11175)
- [P4726 【模板】多项式指数函数(多项式 exp)](https://www.luogu.com.cn/problem/P4726)
- [P2252 [SHOI2002] 取石子游戏|【模板】威佐夫博弈](https://www.luogu.com.cn/problem/P2252)
- [P4725 【模板】多项式对数函数(多项式 ln)](https://www.luogu.com.cn/problem/P4725)
- [P1919 【模板】高精度乘法 | A*B Problem 升级版](https://www.luogu.com.cn/problem/P1919)
- [P4751 【模板】"动态DP"&动态树分治(加强版)](https://www.luogu.com.cn/problem/P4751)
- [P4196 [CQOI2006] 凸多边形 /【模板】半平面交](https://www.luogu.com.cn/problem/P4196)
- [P6577 【模板】二分图最大权完美匹配](https://www.luogu.com.cn/problem/P6577)
- [P4722 【模板】最大流 加强版 / 预流推进](https://www.luogu.com.cn/problem/P4722)
- [P10249 【模板】多项式复合函数(加强版)](https://www.luogu.com.cn/problem/P10249)
- [P5656 【模板】二元一次不定方程 (exgcd)](https://www.luogu.com.cn/problem/P5656)
- [P11266 【模板】完全体·堆](https://www.luogu.com.cn/problem/P11266)
- [P11265 【模板】静态区间半群查询](https://www.luogu.com.cn/problem/P11265)