正文
增加 27 行删除 3 行
168 行未改动全部展开16917017117217317417517612 行未改动189190191192193194195196197100 行未改动29829930030130230330430530625 行未改动33233333433533633733833934034126 行未改动368369370371168 行未改动全部展开- [ ] [P1395 会议——【树的重心模板】](https://www.luogu.com.cn/problem/P1395)[代码](https://www.luogu.com.cn/paste/y1vwwoxp)- [ ] [P3379 【模板】最近公共祖先(LCA)](https://www.luogu.com.cn/problem/P3379)[代码](https://luogu.com.cn/paste/af38j9um)- [ ] [P2052 [NOI2011] 道路修建](https://www.luogu.com.cn/problem/P2052)12 行未改动[代码](https://www.luogu.com.cn/paste/c1lwkf5a)# 动态规划## 背包问题- [ ] [【01背包】——P1048 [NOIP 2005 普及组] 采药](https://www.luogu.com.cn/problem/P1048)[代码](https://www.luogu.com.cn/paste/3z1xj9pt)- [ ] [P1616 疯狂的采药——【完全背包】](https://www.luogu.com.cn/problem/P1616)[代码](https://www.luogu.com.cn/paste/lllx48k9)100 行未改动- [ ] [P3371 【模板】单源最短路径(弱化版)](https://www.luogu.com.cn/problem/P3371)[代码(Bellman–Ford和SPFA做法)](https://www.luogu.com.cn/paste/is0hawq2)- [ ] [P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779)[代码](https://www.luogu.com.cn/paste/mmtsbzg7)## 差分约束**定义:差分约束系统指由多个形如 $x_i-x_j≤c_k$ 的不等式组成的不等式组。其中 $xᵢ$,$xⱼ$ 是变量,$c_k$ 是常数,求解的目标是找到一组满足所有不等式的变量值。**因为不等式的性质,我们可以把不等式变形:$$$25 行未改动- [ ] [P3387 【模板】缩点 / 强连通分量](https://www.luogu.com.cn/problem/P3387)[代码](https://www.luogu.com.cn/paste/ljacm7w3)# 双连通分量**定义:无向图中的一个极大顶点集合,使得删除集合内任意一个顶点后,剩余部分仍然连通的点集为双连通分量,即使得集合内任意两条边都位于同一个简单环上。**- [ ] [P8436 【模板】边双连通分量](https://www.luogu.com.cn/problem/P8436)[代码](https://www.luogu.com.cn/paste/9zodj7ux)- [ ] [P8435 【模板】点双连通分量](https://www.luogu.com.cn/problem/P8435)26 行未改动[代码](https://www.luogu.com.cn/paste/uih5wmju)- [ ] [P2731 [USACO3.3] 骑马修栅栏 Riding the Fences](https://www.luogu.com.cn/problem/P2731)[代码](https://www.luogu.com.cn/paste/nep30zdy)168 行未改动全部展开16917017117217317417517617717817912 行未改动192193194195196197198199200100 行未改动30130230330430530630730830925 行未改动33533633733833934034134234334434534634726 行未改动374375376377378379380381382383384385386387388389390391392393394395168 行未改动全部展开- [ ] [P1395 会议——【树的重心模板】](https://www.luogu.com.cn/problem/P1395)[代码](https://www.luogu.com.cn/paste/y1vwwoxp)- [ ] [B4016 树的直径——【树的直径模板】](https://www.luogu.com.cn/problem/B4016)[代码](https://www.luogu.com.cn/paste/rmbmj9ux)- [ ] [P3379 【模板】最近公共祖先(LCA)](https://www.luogu.com.cn/problem/P3379)[代码](https://luogu.com.cn/paste/af38j9um)- [ ] [P2052 [NOI2011] 道路修建](https://www.luogu.com.cn/problem/P2052)12 行未改动[代码](https://www.luogu.com.cn/paste/c1lwkf5a)# 动态规划## 背包问题- [ ] [P1048 [NOIP 2005 普及组] 采药——【01背包】](https://www.luogu.com.cn/problem/P1048)[代码](https://www.luogu.com.cn/paste/3z1xj9pt)- [ ] [P1616 疯狂的采药——【完全背包】](https://www.luogu.com.cn/problem/P1616)[代码](https://www.luogu.com.cn/paste/lllx48k9)100 行未改动- [ ] [P3371 【模板】单源最短路径(弱化版)](https://www.luogu.com.cn/problem/P3371)[代码(Bellman–Ford和SPFA做法)](https://www.luogu.com.cn/paste/is0hawq2)- [ ] [P4779 【模板】单源最短路径(标准版)](https://www.luogu.com.cn/problem/P4779)[代码(Dijkstra做法)](https://www.luogu.com.cn/paste/mmtsbzg7)## 差分约束**定义:差分约束系统指由多个形如 $x_i-x_j≤c_k$ 的不等式组成的不等式组。其中 $xᵢ$,$xⱼ$ 是变量,$c_k$ 是常数,求解的目标是找到一组满足所有不等式的变量值。**因为不等式的性质,我们可以把不等式变形:$$$25 行未改动- [ ] [P3387 【模板】缩点 / 强连通分量](https://www.luogu.com.cn/problem/P3387)[代码](https://www.luogu.com.cn/paste/ljacm7w3)# 双连通分量**定义:边双连通分量:无向图中的一个极大边集,使得删除集合内任意一条边后,剩余的部分仍然连通,则该边集为边双连通分量,即使得子图边集内任意一条边都位于某一个简单环上。****点双连通分量:无向图中的一个极大顶点集合,使得删除集合内任意一个顶点后,剩余部分仍然连通,则该点集为双连通分量,即使得集合内任意两条边都位于同一个简单环上。**- [ ] [P8436 【模板】边双连通分量](https://www.luogu.com.cn/problem/P8436)[代码](https://www.luogu.com.cn/paste/9zodj7ux)- [ ] [P8435 【模板】点双连通分量](https://www.luogu.com.cn/problem/P8435)26 行未改动[代码](https://www.luogu.com.cn/paste/uih5wmju)- [ ] [P2731 [USACO3.3] 骑马修栅栏 Riding the Fences](https://www.luogu.com.cn/problem/P2731)[代码](https://www.luogu.com.cn/paste/nep30zdy)# 树链剖分- [ ] [P3384 【模板】重链剖分 / 树链剖分](https://www.luogu.com.cn/problem/P3384)[代码](https://www.luogu.com.cn/paste/pzm9mgkq)- [ ] [P2486 [SDOI2011] 染色](https://www.luogu.com.cn/problem/P2486)[代码](https://www.luogu.com.cn/paste/bg471dfr)- [ ] [P1505 [国家集训队] 旅游——【边操作】](https://www.luogu.com.cn/problem/P1505)[代码](https://www.luogu.com.cn/paste/znens2xp)- [ ] [P2146 [NOI2015] 软件包管理器](https://www.luogu.com.cn/problem/P2146)[代码](https://www.luogu.com.cn/paste/1f73dn2o)# 扫描线- [ ] [P5490 【模板】扫描线 & 矩形面积并](https://www.luogu.com.cn/problem/P5490)[代码](https://www.luogu.com.cn/paste/8rq24byb)