基础提高模板

题单介绍

个人整理的一些基础 TG 模板题 已按本人认为的难度/普遍程度排序 会时不时的更新和完善 若有建议,欢迎私信! # 数据结构篇 ## 线段树 - [线段树1](https://www.luogu.com.cn/problem/P3372) - [线段树2](https://www.luogu.com.cn/problem/P3373) - [线段树3](https://www.luogu.com.cn/problem/P6242) - [轻重链剖分](https://www.luogu.com.cn/problem/P3384) - [扫描线](https://www.luogu.com.cn/problem/P5490) - [线段树合并](https://www.luogu.com.cn/problem/P4556) - [线段树分裂](https://www.luogu.com.cn/problem/P5494) ## 主席树(可持久化线段树) - [可持久化线段树(主席树)](https://www.luogu.com.cn/problem/P3834) - [可持久化数组](https://www.luogu.com.cn/problem/P3919) - [可持久化并查集](https://www.luogu.com.cn/problem/P3402) ## 树状数组(~~阉割版线段树~~) - [树状数组 1](https://www.luogu.com.cn/problem/P3374) - [树状数组 2](https://www.luogu.com.cn/problem/P3368) ## st表 - [ST表](https://www.luogu.com.cn/problem/P3865) ## 左偏树 - [左偏树(可并堆)](https://www.luogu.com.cn/problem/P3377) ## 笛卡尔树 - [笛卡尔树](https://www.luogu.com.cn/problem/P5854) ## 平衡树 - [普通平衡树](https://www.luogu.com.cn/problem/P3369) ## 树套树 - [二逼平衡树(树套树)](https://www.luogu.com.cn/problem/P3380) ## 动态树 - [Link Cut Tree (动态树)](https://www.luogu.com.cn/problem/P3690) # 图论 ## 最小生成树 - [最小生成树](https://www.luogu.com.cn/problem/P3366) - [次小生成树](https://www.luogu.com.cn/problem/P4180) ## 最短路/最长路 - [单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779) - [差分约束算法](https://www.luogu.com.cn/problem/P5960) - [负环](https://www.luogu.com.cn/problem/P3385) ## tarjan - [缩点](https://www.luogu.com.cn/problem/P3387) - [割点(割顶)](https://www.luogu.com.cn/problem/P3388) # 树论 - [最近公共祖先(LCA)](https://www.luogu.com.cn/problem/P3379) - [树上 k 级祖先](https://www.luogu.com.cn/problem/P5903) - [点分治](https://www.luogu.com.cn/problem/P3806) # 数论 - [二元一次不定方程(exgcd)](https://www.luogu.com.cn/problem/P5656) - [乘法逆元](https://www.luogu.com.cn/problem/P3811) - [裴蜀定理](https://www.luogu.com.cn/problem/P4549) - [矩阵快速幂](https://www.luogu.com.cn/problem/P3390) - [矩阵加速(数列)](https://www.luogu.com.cn/problem/P1939) - [高斯消元法](https://www.luogu.com.cn/problem/P3389) - [卢卡斯定理](https://www.luogu.com.cn/problem/P3807) # 字符串 - [KMP字符串匹配](https://www.luogu.com.cn/problem/P3375) # 其他 - [三分法](https://www.luogu.com.cn/problem/P3382) - [线性基](https://www.luogu.com.cn/problem/P3812)

题目列表

  • 【模板】线段树 1
  • 【模板】线段树 2
  • 【模板】树状数组 1
  • 【模板】树状数组 2
  • 【模板】最小生成树
  • 【模板】单源最短路径(标准版)
  • 【模板】最近公共祖先(LCA)
  • 【模板】ST 表 & RMQ 问题
  • 【模板】KMP
  • 三分
  • 【模板】重链剖分 / 树链剖分
  • 【模板】树上 K 级祖先
  • 【模板】差分约束
  • 【模板】缩点
  • 【模板】负环
  • 【模板】线性基
  • 【模板】扫描线 & 矩形面积并
  • 【模板】割点(割顶)
  • 【模板】二元一次不定方程 (exgcd)
  • 【模板】模意义下的乘法逆元
  • 【模板】裴蜀定理
  • 【模板】矩阵快速幂
  • 矩阵加速(数列)
  • 【模板】可并堆 1
  • 【模板】高斯消元法
  • 【模板】卢卡斯定理 / Lucas 定理
  • 【模板】普通平衡树
  • 【模板】线段树合并 / [Vani有约会] 雨天的尾巴
  • 【模板】线段树 3(区间最值操作、区间历史最值)
  • 【模板】笛卡尔树
  • 【模板】可持久化线段树 2
  • 【模板】可持久化线段树 1(可持久化数组)
  • 【模板】可持久化并查集
  • 【模板】线段树分裂
  • 【模板】点分治
  • 【模板】树套树
  • 【模板】动态树(LCT)
  • [BJWC2010] 严格次小生成树