版本比较
做题记录
正文
增加 97 行删除 0 行
52 行未改动5354555657585960616271 行未改动13413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123252 行未改动:::
::::
::::info[2026.10]
:::info[10/1 Thursday]4模拟赛题:::
71 行未改动[AGC054C](https://www.luogu.com.cn/problem/solution/AT_agc054_c)青 记 $i$ 的位置为 $p_i$,则合法时 $p_i \le k+i$,对于每个非法都移动到 $k+i$,所以每个 $k+i=p_i$ 可以在 $k+i+1 \sim n$,对答案产生 $n - i - k + 1$ 倍的贡献。
[P2252](https://www.luogu.com.cn/problem/P2252)紫 [题解](https://www.luogu.me/article/tjhp78aw/):::
:::info[10/24 Saterday]1紫+3模拟赛题
[P4737](https://www.luogu.com.cn/problem/P4737)紫 倒过来做,把分割改为合并:::
:::info[10/26 Monday]4模拟赛题:::
:::info[10/27 Tuesday]1蓝1紫+4模拟赛题
[CF896C](https://www.luogu.com.cn/problem/CF896C)蓝 [P7134](https://www.luogu.com.cn/problem/P7134) 紫 珂朵莉树模版:::
:::info[10/28 Wednesday]1紫+4模拟赛题
[P13084](https://www.luogu.com.cn/problem/P13084)紫 先用 Kruskal 重构树,把网格转为树,再求出 dfs 序,LCA,用树状数组维护区间内种类数。:::
:::info[10/29 Thursday]1蓝1紫+4模拟赛题
[P3806](https://www.luogu.com.cn/problem/P3806)蓝 点分治模板。
[P5350](https://www.luogu.com.cn/problem/P5350)紫 珂朵莉树,几乎纯板子。 :::
::::
:::info[11/5 Thursday]4青1紫
[CF1766E](https://www.luogu.com.cn/problem/CF1766E)青 先忽略 0,会发现最多只有 3 个序列。最坏情况:[1],[1,2],[3,2],[2,2],[2,2,1]。
[CF675E](https://www.luogu.com.cn/problem/CF675E)青 dp 答案的后缀和,用 st 表维护一段区间内最大值的位置,作为转移的位置。
[CF1809E](https://www.luogu.com.cn/problem/CF1809E)青 每次倒水总量不变,计算出每个总和的 lo 和 hi,再根据 c 计算最后第一个桶的量。
[CF97D](https://www.luogu.com.cn/problem/CF97D)青 O(nmk) 是 2e9,但只存 bool,用 bitset 优化。
[P16679](https://www.luogu.com.cn/problem/P16679)紫 ODT 维护操作 1 修改 l ~ r,DSU 维护操作 2 合并,SEG 维护操作 5 查询票数最多作品。~~146 行代码 3KiB 真恶心~~。
:::
:::info[11/6 Friday]3青3蓝1紫
[CF617E](https://www.luogu.com.cn/problem/CF617E)青 用前缀和可以快速计算答案,再用莫队。
[P4137](https://www.luogu.com.cn/problem/P4137)蓝 用 bitset 优化 mex,再用莫队。
[CF940F](https://www.luogu.com.cn/problem/CF940F)蓝 带修莫队模板。
[P5906](https://www.luogu.com.cn/problem/P5906)蓝 回滚莫队模板。
[CF852I](https://www.luogu.com.cn/problem/CF852I)紫 树上莫队模板。:::
:::info[11/7 Saturday]3模拟赛题:::
:::info[11/9 Monday]1紫+4模拟赛题
[P17307](https://www.luogu.com.cn/problem/P17307)紫 像模拟赛 T4 的加强版。用 BFS 求出到最近的白点的距离,DFS 时记录剩余步数,如果大于到白点的距离,则可以更新步数。:::
:::info[11/12 Thursday]1蓝1紫+3模拟赛题
[P3376](https://www.luogu.com.cn/problem/P3376)蓝 网络流最大流模板。
[P1231](https://www.luogu.com.cn/problem/P1231)紫 练习册向书 1 建边,书 1 向书 2 建边,书 2 向答案建边,0 为源点,40001 为汇点,跑最大流。:::
:::info[11/13 Friday]1紫+4模拟赛题
[P1402](https://www.luogu.com.cn/problem/P1402)紫 房间向客人 1 建边,客人 1 向客人 2 建边,客人 2 向菜品建边,0 为源点,401 为汇点,跑最大流。:::
:::info[11/14 Saturday]1紫+3模拟赛题
[P3305](https://www.luogu.com.cn/problem/P3305)紫 先正常求最大流,再实数二分使最大边的流量最小且答案不变。:::
:::info[11/16 Mondays]4模拟赛题:::