版本比较
ZROI 2022 暑假题单
正文
增加 55 行删除 55 行
40 行未改动41424344454647484972 行未改动122123124125126127128129130279 行未改动全部展开41041141241341441541641741852 行未改动47147247347447547647747847948048148248348448548648748848949049137 行未改动5295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745752 行未改动5785795805815825835845855865875882 行未改动5915925935945955965975985996006016026036046056066076086096106116126132 行未改动6166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696704 行未改动6756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117123 行未改动71671771871972072172272372472572672772872973073140 行未改动|:----:|:---------------:|:--------------------------------------------------:|| | 线段树 | [P3372](https://www.luogu.com.cn/problem/P3372) || | 线段树2 | [P3373](https://www.luogu.com.cn/problem/P3373) || E1 | 扫描线 | [P5490](https://www.luogu.com.cn/problem/P5490) || E2 | 高速公路 | [P2221](https://www.luogu.com.cn/problem/P2221) |## 2022.7.18:[练习赛](https://vjudge.csgrandeur.cn/contest/505431)72 行未改动+ [莫队](http://oi-wiki.com/misc/mo-algo/)| 来源 | 题目 | 题号 ||:----:|:---------------:|:--------------------------------------------------:|| 例题 | 小Z的袜子 | [P1494](https://www.luogu.com.cn/problem/P1494) || 例题'| 数颜色 | [P1903](https://www.luogu.com.cn/problem/P1903) || 群友 |Count on a tree II|[SP10707](https://www.luogu.com.cn/problem/SP10707)|| | mex | [P4137](https://www.luogu.com.cn/problem/P4137) || | 秃子酋长 | [P8078](https://www.luogu.com.cn/problem/P8078) |279 行未改动全部展开| A题 | 非常恐怖!6G!| [2264](http://zhengruioi.com/problem/2268) | || B题 | 抽象艺术 | [2265](http://zhengruioi.com/problem/2269) | || C题 | FOR一遍搞起来 | [2266](http://zhengruioi.com/problem/2270) | || D题 | 他卷得我哭死 | [2267](http://zhengruioi.com/problem/2271) | |## 2022.7.29没有题目52 行未改动- SG 函数- 子游戏- [例题(Nim 游戏)](https://www.luogu.com.cn/problem/P2197)- K-Nim 游戏- [例题( [SDOI2011]黑白棋)](https://www.luogu.com.cn/problem/P2490)- Anti-SG 游戏- [Anti-Nim 游戏(小约翰的游戏John)](https://vjudge.net/problem/%E9%BB%91%E6%9A%97%E7%88%86%E7%82%B8-1022)- [Nim 其它变种([POI2009]KAM-Pebbles)](https://www.luogu.com.cn/problem/P3480)- [[AGC010D] Decrementing](https://www.luogu.com.cn/problem/AT2305)- [[AGC014D] Black and White Tree](https://www.luogu.com.cn/problem/AT2376)- [Tree Tag](https://www.luogu.com.cn/problem/CF1404B)## 8.3:构造37 行未改动- Rank KMP- AC自动机- [【模板】AC 自动机(简单版)](https://www.luogu.com.cn/problem/P3808)- [【模板】AC 自动机(加强版)](https://www.luogu.com.cn/problem/P3796)- [【模板】AC 自动机(二次加强版)](https://www.luogu.com.cn/problem/P5357)- [[NOI2011] 阿狸的打字机](https://www.luogu.com.cn/problem/P2414)- [[BJOI2019]奥术神杖](https://www.luogu.com.cn/problem/P5319)- [[BalticOI 2020 Day2] 病毒](https://www.luogu.com.cn/problem/P6698)8.6:字符串进阶算法(扩展KMP、AC自动机、回文树)- 哈希- 生日攻击- 树攻击- 多重树攻击- 卡回文串- 卡多哈希- Manacher- [【模板】manacher 算法](https://www.luogu.com.cn/problem/P3805)- [Tricky and Clever Password](https://www.luogu.com.cn/problem/CF30E)- Z函数- [【模板】扩展 KMP(Z 函数)](https://www.luogu.com.cn/problem/P5410)- [Boboniu and Banknote Collection](https://www.luogu.com.cn/problem/CF1394E)## 8.7:后缀数组与后缀自动机、广义SAM- 后缀数组- [【模板】后缀排序](https://www.luogu.com.cn/problem/P3809)- H 数组- [[NOI2016] 优秀的拆分](https://www.luogu.com.cn/problem/P1117)- 后缀自动机2 行未改动- [Weather](https://www.luogu.com.cn/problem/CF234C)- 线段树(合并)维护 Right 集合- [[HEOI2016/TJOI2016]字符串](https://www.luogu.com.cn/problem/P4094)- [Cool Slogans](https://www.luogu.com.cn/problem/CF700E)- [How Many Substrings?](https://www.hackerrank.com/challenges/how-many-substrings/problem)## 8.8:趣题(杂题)选做2 行未改动8.10:基础图论(拓扑排序、最短路、最小生成树、强联通与双联通、Tarjan算法)- 邻接矩阵- 有⼀个图的邻接矩阵是 $A$ ,其中 $A_{i, j} = 0$ 代表 $i$ 到 $j$ 没有边, $A_{i, j} = 1$ 代表有边。求从 $i$ 到 $j$ 经过 $k$ 条边有⼏条路径。- 有⼀个 $k$ 部图,划分为 $k$ 个点集 $V_1, \dots , V_k$,其中 $\left| V_i \right| \le m$ 。只在 $V_i$ 到 $V_{i + 1}$ 有边,这些边⽤矩阵 $A^{(i)}$ 表示, $A_{a, b}^{(i)} = 1$ 代表存在边。⼀共 $q$ 个询问,每个询问为 $l r x y$ ,询问从 $V_l$ 中的点 $x$ 到 $V_r$ 中的点 $y$ 有多少条路径。 $n \le 10^4, m \le 20$ 。- Floyd求最短路- 给定⼀个边权为正,没有重边的⽆向图,求其中⻓度最⼩的环的⻓度。- 每个点有⼀个出现时间 $t_i$ ,在 $t_i$ 之前图中不包含这个点。有若⼲个询问,每个询问为 $u v t$ ,表示 $t$ 时刻,图中 $u$ 到 $v$ 的最短路。- 给定⼀个图,输出 $n$ 个数,其中第 $i$ 个数表示从 $u_i$ 到 $v_i$ ,不经过编号为 $i$ 的点的最短路。- Dijkstra求最短路- 在保持从 1 号点到每个点最短的情况下,问最多可以删除多少条边。- 给⼀个⽆向图,边权为正,给出若⼲个限制条件 $a_i, b_i, c_i$ ,表示不能连续经过这三个点。问从 $1$ 到 $n$ 的最短路。 $n \le 2000, m \le 20000$- SPFA 求最短路2 行未改动- 差分约束系统- ⻓度为 $n$ 的整数序列有 $m$ 个限制。第 $i$ 个限制为 $\sum\limits_{j = L_i}^{R_i} A_j < k_i$ ,或者 $\sum\limits_{j = L_i}^{R_i} A_j > k_i$ 。问是否存在序列。- 每个点可以进⾏⼀种操作:所有以 $v$ 为终点的边权值减⼩ $d$ ,所有以 $v$ 为起点的点权值增加 $d$ 。最后要让所有边的权值⾮负且尽量⼤。- 考试后,每个选⼿的分数是 。有两类限制条件:$$ \begin{aligned}s_a > ks_b, s_a < \frac{1}{k} s_b\end{aligned} $$如果某个限制条件不满⾜,则 $a$ 要吃键盘。找⼀个最⼤的 $T$ ,使得限制条件修改为如下后,依然有⼈吃键盘。$$ \begin{aligned}s_a > (k - T) s_b, s_a < \frac{1}{k + T} s_b\end{aligned} $$- 拓扑排序- [P3243 [HNOI2015]菜肴制作](https://www.luogu.com.cn/problem/P3243)- 强连通分量- 给⼀张有向图,输出⼀个 n × n 的 01 矩阵,⼀个位置 (i; j) 为 1 当且仅当点 i 可以到达 j。 $n \le 2000, m \le n(n - 1) $。- 给⼀个有向图,你可以选择⼀条边把它反向(也可以不选),然后选⼀条路径起点终点都为 1 的路径出来,问最多有多少个点可以被经过?## 8.11:图论基础应用(同余bfs、查分约束、2-SAT)- 图的割点和桥- [[HNOI2012]矿场搭建](https://www.luogu.com.cn/problem/P3225)- 边双连通分量- [We Need More Bosses](https://www.luogu.com.cn/problem/CF1000E)- [[USACO06JAN]Redundant Paths G](https://www.luogu.com.cn/problem/P2860)- [Case of Computer Network](https://www.luogu.com.cn/problem/CF555E)- 动态连通性- 给出⼀个n个点的图,m个操作,⼀类是加边,⼀类是删边,还有⼀类是询问连通块个数。- 加边,删边,询问是否为⼆分图。- 只有加边,问图的桥数量。## 8.12:网络流(二分图匹配、最大流、最小费用流)- 最大流- ford-fulkerson 算法- dinic 算法- [【模板】网络最大流](https://www.luogu.com.cn/problem/P3376)- 二分图最大匹配- [【模板】二分图最大匹配](https://www.luogu.com.cn/problem/P3386)4 行未改动- 无向图- 顶点上有容量限制- [二分图最大匹配](https://uoj.ac/problem/78)- [Dining](http://poj.org/problem?id=3281)- [Evacuation](http://poj.org/problem?id=3057)- 最小费用流- zkw费用流- 最小费用最大流(MCMF)- [Evacuation Plan](http://poj.org/problem?id=2175)- [例题](https://community.topcoder.com/stat?c=problem_statement&pm=12432)- [Beautiful League](https://codeforces.com/problemset/problem/1264/E)## 8.13:网络流进阶建模、增流退流、上下界流- max-flow min-cut 定理- [Petya and Graph](https://codeforces.com/contest/1082/problem/G)- [RatingProgressAward](https://vjudge.net/problem/TopCoder-14719)- [[HNOI2013]切糕](https://www.luogu.com.cn/problem/P3227)- 二分图最大独立集、最小点覆盖、最小割与最大匹配的关系- [Asteroids](http://poj.org/problem?id=3041)- [GearsDiv1](https://vjudge.net/problem/TopCoder-12729)- [Check Pattern is Good](https://codeforces.com/gym/103861/problem/H)- 增流/退流- [「JSOI2018」绝地反击](https://loj.ac/p/2548)3 行未改动- 有源汇上下界最大流- 有源汇上下界最小流- [Red-Blue Graph](https://codeforces.com/problemset/problem/1288/F)- [「NOI2015」小园丁与老司机](https://loj.ac/p/2134)- [Dual Core CPU](https://vjudge.net/problem/POJ-3469)- [Bricks](https://codeforces.com/problemset/problem/1404/E)-[Intervals](https://vjudge.net/problem/POJ-3680)- [Aarelia Mountains](https://www.acmicpc.net/problem/19208)- [Zoning Restrictions](https://codeforces.com/contest/1146/problem/G)40 行未改动41424344454647484972 行未改动122123124125126127128129130279 行未改动全部展开41041141241341441541641741852 行未改动47147247347447547647747847948048148248348448548648748848949049137 行未改动5295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745752 行未改动5785795805815825835845855865875882 行未改动5915925935945955965975985996006016026036046056066076086096106116126132 行未改动6166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696704 行未改动6756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117123 行未改动71671771871972072172272372472572672772872973073140 行未改动|:----:|:---------------:|:--------------------------------------------------:|| | 线段树 | [P3372](https://www.luogu.com.cn/problem/P3372) || | 线段树2 | [P3373](https://www.luogu.com.cn/problem/P3373) || E1 | 扫描线 | [P5490](https://www.luogu.com.cn/problem/P5490) || E2 | 高速公路 | [P2221](https://www.luogu.com.cn/problem/P2221) |## 2022.7.18:[练习赛](https://vjudge.csgrandeur.cn/contest/505431)72 行未改动+ [莫队](http://oi-wiki.com/misc/mo-algo/)| 来源 | 题目 | 题号 ||:----:|:---------------:|:--------------------------------------------------:|| 例题 | 小Z的袜子 | [P1494](https://www.luogu.com.cn/problem/P1494) || 例题'| 数颜色 | [P1903](https://www.luogu.com.cn/problem/P1903) || 群友 |Count on a tree II|[SP10707](https://www.luogu.com.cn/problem/SP10707)|| | mex | [P4137](https://www.luogu.com.cn/problem/P4137) || | 秃子酋长 | [P8078](https://www.luogu.com.cn/problem/P8078) |279 行未改动全部展开| A题 | 非常恐怖!6G!| [2264](http://zhengruioi.com/problem/2268) | || B题 | 抽象艺术 | [2265](http://zhengruioi.com/problem/2269) | || C题 | FOR一遍搞起来 | [2266](http://zhengruioi.com/problem/2270) | || D题 | 他卷得我哭死 | [2267](http://zhengruioi.com/problem/2271) | |## 2022.7.29没有题目52 行未改动- SG 函数- 子游戏- [例题(Nim 游戏)](https://www.luogu.com.cn/problem/P2197)- K-Nim 游戏- [例题( [SDOI2011]黑白棋)](https://www.luogu.com.cn/problem/P2490)- Anti-SG 游戏- [Anti-Nim 游戏(小约翰的游戏John)](https://vjudge.net/problem/%E9%BB%91%E6%9A%97%E7%88%86%E7%82%B8-1022)- [Nim 其它变种([POI2009]KAM-Pebbles)](https://www.luogu.com.cn/problem/P3480)- [[AGC010D] Decrementing](https://www.luogu.com.cn/problem/AT2305)- [[AGC014D] Black and White Tree](https://www.luogu.com.cn/problem/AT2376)- [Tree Tag](https://www.luogu.com.cn/problem/CF1404B)## 8.3:构造37 行未改动- Rank KMP- AC自动机- [【模板】AC 自动机(简单版)](https://www.luogu.com.cn/problem/P3808)- [【模板】AC 自动机(加强版)](https://www.luogu.com.cn/problem/P3796)- [【模板】AC 自动机(二次加强版)](https://www.luogu.com.cn/problem/P5357)- [[NOI2011] 阿狸的打字机](https://www.luogu.com.cn/problem/P2414)- [[BJOI2019]奥术神杖](https://www.luogu.com.cn/problem/P5319)- [[BalticOI 2020 Day2] 病毒](https://www.luogu.com.cn/problem/P6698)8.6:字符串进阶算法(扩展KMP、AC自动机、回文树)- 哈希- 生日攻击- 树攻击- 多重树攻击- 卡回文串- 卡多哈希- Manacher- [【模板】manacher 算法](https://www.luogu.com.cn/problem/P3805)- [Tricky and Clever Password](https://www.luogu.com.cn/problem/CF30E)- Z函数- [【模板】扩展 KMP(Z 函数)](https://www.luogu.com.cn/problem/P5410)- [Boboniu and Banknote Collection](https://www.luogu.com.cn/problem/CF1394E)## 8.7:后缀数组与后缀自动机、广义SAM- 后缀数组- [【模板】后缀排序](https://www.luogu.com.cn/problem/P3809)- H 数组- [[NOI2016] 优秀的拆分](https://www.luogu.com.cn/problem/P1117)- 后缀自动机2 行未改动- [Weather](https://www.luogu.com.cn/problem/CF234C)- 线段树(合并)维护 Right 集合- [[HEOI2016/TJOI2016]字符串](https://www.luogu.com.cn/problem/P4094)- [Cool Slogans](https://www.luogu.com.cn/problem/CF700E)- [How Many Substrings?](https://www.hackerrank.com/challenges/how-many-substrings/problem)## 8.8:趣题(杂题)选做2 行未改动8.10:基础图论(拓扑排序、最短路、最小生成树、强联通与双联通、Tarjan算法)- 邻接矩阵- 有⼀个图的邻接矩阵是 $A$ ,其中 $A_{i, j} = 0$ 代表 $i$ 到 $j$ 没有边, $A_{i, j} = 1$ 代表有边。求从 $i$ 到 $j$ 经过 $k$ 条边有⼏条路径。- 有⼀个 $k$ 部图,划分为 $k$ 个点集 $V_1, \dots , V_k$,其中 $\left| V_i \right| \le m$ 。只在 $V_i$ 到 $V_{i + 1}$ 有边,这些边⽤矩阵 $A^{(i)}$ 表示, $A_{a, b}^{(i)} = 1$ 代表存在边。⼀共 $q$ 个询问,每个询问为 $l r x y$ ,询问从 $V_l$ 中的点 $x$ 到 $V_r$ 中的点 $y$ 有多少条路径。 $n \le 10^4, m \le 20$ 。- Floyd求最短路- 给定⼀个边权为正,没有重边的⽆向图,求其中⻓度最⼩的环的⻓度。- 每个点有⼀个出现时间 $t_i$ ,在 $t_i$ 之前图中不包含这个点。有若⼲个询问,每个询问为 $u v t$ ,表示 $t$ 时刻,图中 $u$ 到 $v$ 的最短路。- 给定⼀个图,输出 $n$ 个数,其中第 $i$ 个数表示从 $u_i$ 到 $v_i$ ,不经过编号为 $i$ 的点的最短路。- Dijkstra求最短路- 在保持从 1 号点到每个点最短的情况下,问最多可以删除多少条边。- 给⼀个⽆向图,边权为正,给出若⼲个限制条件 $a_i, b_i, c_i$ ,表示不能连续经过这三个点。问从 $1$ 到 $n$ 的最短路。 $n \le 2000, m \le 20000$- SPFA 求最短路2 行未改动- 差分约束系统- ⻓度为 $n$ 的整数序列有 $m$ 个限制。第 $i$ 个限制为 $\sum\limits_{j = L_i}^{R_i} A_j < k_i$ ,或者 $\sum\limits_{j = L_i}^{R_i} A_j > k_i$ 。问是否存在序列。- 每个点可以进⾏⼀种操作:所有以 $v$ 为终点的边权值减⼩ $d$ ,所有以 $v$ 为起点的点权值增加 $d$ 。最后要让所有边的权值⾮负且尽量⼤。- 考试后,每个选⼿的分数是 。有两类限制条件:$$ \begin{aligned}s_a > ks_b, s_a < \frac{1}{k} s_b\end{aligned} $$如果某个限制条件不满⾜,则 $a$ 要吃键盘。找⼀个最⼤的 $T$ ,使得限制条件修改为如下后,依然有⼈吃键盘。$$ \begin{aligned}s_a > (k - T) s_b, s_a < \frac{1}{k + T} s_b\end{aligned} $$- 拓扑排序- [P3243 [HNOI2015]菜肴制作](https://www.luogu.com.cn/problem/P3243)- 强连通分量- 给⼀张有向图,输出⼀个 n × n 的 01 矩阵,⼀个位置 (i; j) 为 1 当且仅当点 i 可以到达 j。 $n \le 2000, m \le n(n - 1) $。- 给⼀个有向图,你可以选择⼀条边把它反向(也可以不选),然后选⼀条路径起点终点都为 1 的路径出来,问最多有多少个点可以被经过?## 8.11:图论基础应用(同余bfs、查分约束、2-SAT)- 图的割点和桥- [[HNOI2012]矿场搭建](https://www.luogu.com.cn/problem/P3225)- 边双连通分量- [We Need More Bosses](https://www.luogu.com.cn/problem/CF1000E)- [[USACO06JAN]Redundant Paths G](https://www.luogu.com.cn/problem/P2860)- [Case of Computer Network](https://www.luogu.com.cn/problem/CF555E)- 动态连通性- 给出⼀个n个点的图,m个操作,⼀类是加边,⼀类是删边,还有⼀类是询问连通块个数。- 加边,删边,询问是否为⼆分图。- 只有加边,问图的桥数量。## 8.12:网络流(二分图匹配、最大流、最小费用流)- 最大流- ford-fulkerson 算法- dinic 算法- [【模板】网络最大流](https://www.luogu.com.cn/problem/P3376)- 二分图最大匹配- [【模板】二分图最大匹配](https://www.luogu.com.cn/problem/P3386)4 行未改动- 无向图- 顶点上有容量限制- [二分图最大匹配](https://uoj.ac/problem/78)- [Dining](http://poj.org/problem?id=3281)- [Evacuation](http://poj.org/problem?id=3057)- 最小费用流- zkw费用流- 最小费用最大流(MCMF)- [Evacuation Plan](http://poj.org/problem?id=2175)- [例题](https://community.topcoder.com/stat?c=problem_statement&pm=12432)- [Beautiful League](https://codeforces.com/problemset/problem/1264/E)## 8.13:网络流进阶建模、增流退流、上下界流- max-flow min-cut 定理- [Petya and Graph](https://codeforces.com/contest/1082/problem/G)- [RatingProgressAward](https://vjudge.net/problem/TopCoder-14719)- [[HNOI2013]切糕](https://www.luogu.com.cn/problem/P3227)- 二分图最大独立集、最小点覆盖、最小割与最大匹配的关系- [Asteroids](http://poj.org/problem?id=3041)- [GearsDiv1](https://vjudge.net/problem/TopCoder-12729)- [Check Pattern is Good](https://codeforces.com/gym/103861/problem/H)- 增流/退流- [「JSOI2018」绝地反击](https://loj.ac/p/2548)3 行未改动- 有源汇上下界最大流- 有源汇上下界最小流- [Red-Blue Graph](https://codeforces.com/problemset/problem/1288/F)- [「NOI2015」小园丁与老司机](https://loj.ac/p/2134)- [Dual Core CPU](https://vjudge.net/problem/POJ-3469)- [Bricks](https://codeforces.com/problemset/problem/1404/E)-[Intervals](https://vjudge.net/problem/POJ-3680)- [Aarelia Mountains](https://www.acmicpc.net/problem/19208)- [Zoning Restrictions](https://codeforces.com/contest/1146/problem/G)