# MyAlgorithmProblems 算法题库与研究笔记 [在线阅读 / Website](https://occamgc.github.io/MyAlgorithmProblems/) · [研究成果 / Research](https://occamgc.github.io/MyAlgorithmProblems/research/) · [新增成果与网站维护 / Contributing](website/CONTRIBUTING.md) 共 192 道题,按主题排列。每题提供中英文题面与题解、C++17 标准程序、样例,以及可重复生成测试输入的 Python 3 脚本。具有多种解法的题目在题解中说明首选、并列或备用方案及其适用条件。 题目使用与评测说明见[评测环境与性能](docs/评测环境与性能.md)。Grox、Spode 系列的英文题记来源见[Spore 题记来源](docs/Spore题记来源.md)。 192 algorithm problems with Chinese and English statements and editorials, C++17 solutions, and reproducible Python test generators. Research notes include amortized analysis of translation matching in induced grid forests and obstructions to extending such forests to trees. ## 研究成果 / Research results 下表链接到结论摘要、精确假设、证明和复核方法。这里的 n 是网格边长,N 是道路顶点数,m 是移动次数。 The entries below give precise assumptions, result summaries, proofs, and reproducibility instructions. Here n is the board side length, N the number of road vertices, and m the number of moves. | 问题 / Question | 结论 / Result | 阅读入口 / Start here | | --- | --- | --- | | 四邻接网格森林的平移匹配 / Translation matching in four-neighbor grid forests | 候选列表算法的总检查次数 W ≤ (5n−3)N,时间 O(n²+m+nN),从而 O(n³+m) / Cubic upper bound; matching worst-case lower bound when m ≥ n−1 | [中文](topics/simulation/grid-forest-matching/research/results/cubic-bound.zh.md) · [English](topics/simulation/grid-forest-matching/research/results/cubic-bound.en.md) | | 诱导网格森林能否补点扩充成树 / Can an induced grid forest be extended to a tree by adding vertices? | 固定位置、保留全部四邻接边时不一定能;存在 Θ(n) 棵、每棵 Θ(n) 个顶点的两两障碍族 / Counterexamples with linearly many large components | [中文](topics/simulation/grid-forest-matching/research/results/tree-extension.zh.md) · [English](topics/simulation/grid-forest-matching/research/results/tree-extension.en.md) | | 只允许四个对角方向 / Diagonal-only adjacency and movement | 奇偶拆分保留 W ≤ (5n−3)N 与 O(n³+m);补树障碍可迁移 / Parity reduction preserves the cubic bounds and tree-extension obstructions | [中文与完整证明](topics/simulation/grid-forest-matching/research/results/diagonal-only.zh.md) · [English with proof](topics/simulation/grid-forest-matching/research/results/diagonal-only.en.md) | | 同时允许正交与对角方向 / Eight-neighbor adjacency and movement | 秩四方向词保留原收费证明、W ≤ (5n−3)N 和三次方最坏量级 / Rank-four direction words preserve the exact check bound and cubic worst-case order | [中文与完整证明](topics/simulation/grid-forest-matching/research/results/eight-neighbor.zh.md) · [English with proof](topics/simulation/grid-forest-matching/research/results/eight-neighbor.en.md) | | 四邻接与八邻接均允许路径障碍 / Four- and eight-neighbor forests with blocked edges | 按实际开放边修改算法与交域,仍有 W ≤ (5n−3)N 和 O(n³+m);附验证报告 / Edge-aware filtering and intersections retain the exact cubic bound, with reproducible evidence | [中文与完整证明](topics/simulation/grid-forest-matching/research/results/edge-obstacles.zh.md) · [English with proof](topics/simulation/grid-forest-matching/research/results/edge-obstacles.en.md) | [全部研究材料 / Research directory](topics/simulation/grid-forest-matching/research/README.md) · [结论与状态索引 / Machine-readable result index](research-index.json) · [Agent 阅读导航 / Agent reading guide](llms.txt) · [引用 / How to cite](CITATION.md) ## 题目目录 | 主题 | 题目 | 题面 | 题解 | | --- | --- | --- | --- | | 算术 | 星际订单:加速度 | [中文](topics/arithmetic/acceleration-orders/statement.zh.md) · [English](topics/arithmetic/acceleration-orders/statement.en.md) | [中文](topics/arithmetic/acceleration-orders/solution.zh.md) · [English](topics/arithmetic/acceleration-orders/solution.en.md) | | 自动机 | 地牢房间的行为等价 | [中文](topics/automata/dungeon-room-equivalence/statement.zh.md) · [English](topics/automata/dungeon-room-equivalence/statement.en.md) | [中文](topics/automata/dungeon-room-equivalence/solution.zh.md) · [English](topics/automata/dungeon-room-equivalence/solution.en.md) | | 位运算 | 动态二进制约束计数 | [中文](topics/bitwise/dynamic-binary-bounds/statement.zh.md) · [English](topics/bitwise/dynamic-binary-bounds/statement.en.md) | [中文](topics/bitwise/dynamic-binary-bounds/solution.zh.md) · [English](topics/bitwise/dynamic-binary-bounds/solution.en.md) | | 位运算 | 异星工厂:信号网络 | [中文](topics/bitwise/signal-network/statement.zh.md) · [English](topics/bitwise/signal-network/statement.en.md) | [中文](topics/bitwise/signal-network/solution.zh.md) · [English](topics/bitwise/signal-network/solution.en.md) | | 组合计数 | 叶子不区分的建树顺序 | [中文](topics/combinatorics/anonymous-leaf-orders/statement.zh.md) · [English](topics/combinatorics/anonymous-leaf-orders/statement.en.md) | [中文](topics/combinatorics/anonymous-leaf-orders/solution.zh.md) · [English](topics/combinatorics/anonymous-leaf-orders/solution.en.md) | | 组合计数 | 二的幂拆分计数 | [中文](topics/combinatorics/binary-power-partitions/statement.zh.md) · [English](topics/combinatorics/binary-power-partitions/statement.en.md) | [中文](topics/combinatorics/binary-power-partitions/solution.zh.md) · [English](topics/combinatorics/binary-power-partitions/solution.en.md) | | 组合计数 | 有限跨度的管道 | [中文](topics/combinatorics/bounded-span-pipelines/statement.zh.md) · [English](topics/combinatorics/bounded-span-pipelines/statement.en.md) | [中文](topics/combinatorics/bounded-span-pipelines/solution.zh.md) · [English](topics/combinatorics/bounded-span-pipelines/solution.en.md) | | 组合计数 | 多类配对的 DNA 双链计数 | [中文](topics/combinatorics/general-paired-strands/statement.zh.md) · [English](topics/combinatorics/general-paired-strands/statement.en.md) | [中文](topics/combinatorics/general-paired-strands/solution.zh.md) · [English](topics/combinatorics/general-paired-strands/solution.en.md) | | 组合计数 | Grox的序列一 | [中文](topics/combinatorics/grox-sequence-1/statement.zh.md) · [English](topics/combinatorics/grox-sequence-1/statement.en.md) | [中文](topics/combinatorics/grox-sequence-1/solution.zh.md) · [English](topics/combinatorics/grox-sequence-1/solution.en.md) | | 组合计数 | Grox的序列二 | [中文](topics/combinatorics/grox-sequence-2/statement.zh.md) · [English](topics/combinatorics/grox-sequence-2/statement.en.md) | [中文](topics/combinatorics/grox-sequence-2/solution.zh.md) · [English](topics/combinatorics/grox-sequence-2/solution.en.md) | | 组合计数 | Grox的序列四 | [中文](topics/combinatorics/grox-sequence-4/statement.zh.md) · [English](topics/combinatorics/grox-sequence-4/statement.en.md) | [中文](topics/combinatorics/grox-sequence-4/solution.zh.md) · [English](topics/combinatorics/grox-sequence-4/solution.en.md) | | 组合计数 | Grox的序列五A | [中文](topics/combinatorics/grox-sequence-5a/statement.zh.md) · [English](topics/combinatorics/grox-sequence-5a/statement.en.md) | [中文](topics/combinatorics/grox-sequence-5a/solution.zh.md) · [English](topics/combinatorics/grox-sequence-5a/solution.en.md) | | 组合计数 | Grox的序列五B | [中文](topics/combinatorics/grox-sequence-5b/statement.zh.md) · [English](topics/combinatorics/grox-sequence-5b/statement.en.md) | [中文](topics/combinatorics/grox-sequence-5b/solution.zh.md) · [English](topics/combinatorics/grox-sequence-5b/solution.en.md) | | 组合计数 | 指定叶子数的建树顺序 | [中文](topics/combinatorics/labeled-leaf-orders/statement.zh.md) · [English](topics/combinatorics/labeled-leaf-orders/statement.en.md) | [中文](topics/combinatorics/labeled-leaf-orders/solution.zh.md) · [English](topics/combinatorics/labeled-leaf-orders/solution.en.md) | | 组合计数 | 某不科学的单调序列计数 | [中文](topics/combinatorics/monotone-sequence-count/statement.zh.md) · [English](topics/combinatorics/monotone-sequence-count/statement.en.md) | [中文](topics/combinatorics/monotone-sequence-count/solution.zh.md) · [English](topics/combinatorics/monotone-sequence-count/solution.en.md) | | 组合计数 | 某不科学的单调序列的首项加权和 | [中文](topics/combinatorics/nested-linear-sum/statement.zh.md) · [English](topics/combinatorics/nested-linear-sum/statement.en.md) | [中文](topics/combinatorics/nested-linear-sum/solution.zh.md) · [English](topics/combinatorics/nested-linear-sum/solution.en.md) | | 组合计数 | 某不科学的多重前缀求和 | [中文](topics/combinatorics/nested-polynomial-sum/statement.zh.md) · [English](topics/combinatorics/nested-polynomial-sum/statement.en.md) | [中文](topics/combinatorics/nested-polynomial-sum/solution.zh.md) · [English](topics/combinatorics/nested-polynomial-sum/solution.en.md) | | 组合计数 | 按顺序连成树 | [中文](topics/combinatorics/ordered-tree-building/statement.zh.md) · [English](topics/combinatorics/ordered-tree-building/statement.en.md) | [中文](topics/combinatorics/ordered-tree-building/solution.zh.md) · [English](topics/combinatorics/ordered-tree-building/solution.en.md) | | 组合计数 | DNA 双链序列计数 | [中文](topics/combinatorics/paired-strand-count/statement.zh.md) · [English](topics/combinatorics/paired-strand-count/statement.en.md) | [中文](topics/combinatorics/paired-strand-count/solution.zh.md) · [English](topics/combinatorics/paired-strand-count/solution.en.md) | | 组合计数 | 圣辇船直营菓子工房的补货 | [中文](topics/combinatorics/holy-palanquin-confectionery/statement.zh.md) · [English](topics/combinatorics/holy-palanquin-confectionery/statement.en.md) | [中文](topics/combinatorics/holy-palanquin-confectionery/solution.zh.md) · [English](topics/combinatorics/holy-palanquin-confectionery/solution.en.md) | | 组合计数 | 犀牛坦克 | [中文](topics/combinatorics/rhino-tank/statement.zh.md) · [English](topics/combinatorics/rhino-tank/statement.en.md) | [中文](topics/combinatorics/rhino-tank/solution.zh.md) · [English](topics/combinatorics/rhino-tank/solution.en.md) | | 组合计数 | 平方和球柱的容量 | [中文](topics/combinatorics/square-sum-capacity/statement.zh.md) · [English](topics/combinatorics/square-sum-capacity/statement.en.md) | [中文](topics/combinatorics/square-sum-capacity/solution.zh.md) · [English](topics/combinatorics/square-sum-capacity/solution.en.md) | | 组合计数 | 平方和球柱 | [中文](topics/combinatorics/square-sum-stacks/statement.zh.md) · [English](topics/combinatorics/square-sum-stacks/statement.en.md) | [中文](topics/combinatorics/square-sum-stacks/solution.zh.md) · [English](topics/combinatorics/square-sum-stacks/solution.en.md) | | 组合计数 | DNA 双链长度区间计数 | [中文](topics/combinatorics/strand-length-range/statement.zh.md) · [English](topics/combinatorics/strand-length-range/statement.en.md) | [中文](topics/combinatorics/strand-length-range/solution.zh.md) · [English](topics/combinatorics/strand-length-range/solution.en.md) | | 组合计数 | 子格计数 | [中文](topics/combinatorics/sublattice-count/statement.zh.md) · [English](topics/combinatorics/sublattice-count/statement.en.md) | [中文](topics/combinatorics/sublattice-count/solution.zh.md) · [English](topics/combinatorics/sublattice-count/solution.en.md) | | 组合计数 | 没有全黑直线的棋盘 | [中文](topics/combinatorics/white-cell-board/statement.zh.md) · [English](topics/combinatorics/white-cell-board/statement.en.md) | [中文](topics/combinatorics/white-cell-board/solution.zh.md) · [English](topics/combinatorics/white-cell-board/solution.en.md) | | 构造 | 交换之后的复原 | [中文](topics/constructive/mind-swap-restoration/statement.zh.md) · [English](topics/constructive/mind-swap-restoration/statement.en.md) | [中文](topics/constructive/mind-swap-restoration/solution.zh.md) · [English](topics/constructive/mind-swap-restoration/solution.en.md) | | 构造 | 较小权不完美非匹配 | [中文](topics/constructive/lower-weight-imperfect-non-matching/statement.zh.md) · [English](topics/constructive/lower-weight-imperfect-non-matching/statement.en.md) | [中文](topics/constructive/lower-weight-imperfect-non-matching/solution.zh.md) · [English](topics/constructive/lower-weight-imperfect-non-matching/solution.en.md) | | 数据结构 | 分批更新的矩形最大值 | [中文](topics/data-structures/batched-rectangle-maximum/statement.zh.md) · [English](topics/data-structures/batched-rectangle-maximum/statement.en.md) | [中文](topics/data-structures/batched-rectangle-maximum/solution.zh.md) · [English](topics/data-structures/batched-rectangle-maximum/solution.en.md) | | 数据结构 | 限长传送带 | [中文](topics/data-structures/bounded-conveyor/statement.zh.md) · [English](topics/data-structures/bounded-conveyor/statement.en.md) | [中文](topics/data-structures/bounded-conveyor/solution.zh.md) · [English](topics/data-structures/bounded-conveyor/solution.en.md) | | 数据结构 | 土罐的序列 | [中文](topics/data-structures/canister-sequence/statement.zh.md) · [English](topics/data-structures/canister-sequence/statement.en.md) | [中文](topics/data-structures/canister-sequence/solution.zh.md) · [English](topics/data-structures/canister-sequence/solution.en.md) | | 数据结构 | 催化序列 | [中文](topics/data-structures/catalyst-sequence/statement.zh.md) · [English](topics/data-structures/catalyst-sequence/statement.en.md) | [中文](topics/data-structures/catalyst-sequence/solution.zh.md) · [English](topics/data-structures/catalyst-sequence/solution.en.md) | | 数据结构 | 贸易 | [中文](topics/data-structures/colony-trade/statement.zh.md) · [English](topics/data-structures/colony-trade/statement.en.md) | [中文](topics/data-structures/colony-trade/solution.zh.md) · [English](topics/data-structures/colony-trade/solution.en.md) | | 数据结构 | 契约召唤 | [中文](topics/data-structures/contract-summoning/statement.zh.md) · [English](topics/data-structures/contract-summoning/statement.en.md) | [中文](topics/data-structures/contract-summoning/solution.zh.md) · [English](topics/data-structures/contract-summoning/solution.en.md) | | 数据结构 | 饼干交换大会 | [中文](topics/data-structures/cookie-swap/statement.zh.md) · [English](topics/data-structures/cookie-swap/statement.en.md) | [中文](topics/data-structures/cookie-swap/solution.zh.md) · [English](topics/data-structures/cookie-swap/solution.en.md) | | 数据结构 | 晶块链表 | [中文](topics/data-structures/crystal-list/statement.zh.md) · [English](topics/data-structures/crystal-list/statement.en.md) | [中文](topics/data-structures/crystal-list/solution.zh.md) · [English](topics/data-structures/crystal-list/solution.en.md) | | 数据结构 | 可修改序列的单调栈 | [中文](topics/data-structures/dynamic-decreasing-stack/statement.zh.md) · [English](topics/data-structures/dynamic-decreasing-stack/statement.en.md) | [中文](topics/data-structures/dynamic-decreasing-stack/solution.zh.md) · [English](topics/data-structures/dynamic-decreasing-stack/solution.en.md) | | 数据结构 | 这题是你自己出的 | [中文](topics/data-structures/you-wrote-this-problem/statement.zh.md) · [English](topics/data-structures/you-wrote-this-problem/statement.en.md) | [中文](topics/data-structures/you-wrote-this-problem/solution.zh.md) · [English](topics/data-structures/you-wrote-this-problem/solution.en.md) | | 数据结构 | 老Y的线段树 | [中文](topics/data-structures/old-y-segment-tree/statement.zh.md) · [English](topics/data-structures/old-y-segment-tree/statement.en.md) | [中文](topics/data-structures/old-y-segment-tree/solution.zh.md) · [English](topics/data-structures/old-y-segment-tree/solution.en.md) | | 数据结构 | 保留形状的二叉搜索树 | [中文](topics/data-structures/exact-search-tree/statement.zh.md) · [English](topics/data-structures/exact-search-tree/statement.en.md) | [中文](topics/data-structures/exact-search-tree/solution.zh.md) · [English](topics/data-structures/exact-search-tree/solution.en.md) | | 数据结构 | 格兰之森 | [中文](topics/data-structures/gran-forest/statement.zh.md) · [English](topics/data-structures/gran-forest/statement.en.md) | [中文](topics/data-structures/gran-forest/solution.zh.md) · [English](topics/data-structures/gran-forest/solution.en.md) | | 数据结构 | 区间中位数 | [中文](topics/data-structures/interval-median/statement.zh.md) · [English](topics/data-structures/interval-median/statement.en.md) | [中文](topics/data-structures/interval-median/solution.zh.md) · [English](topics/data-structures/interval-median/solution.en.md) | | 数据结构 | 区间最值 | [中文](topics/data-structures/interval-top-half/statement.zh.md) · [English](topics/data-structures/interval-top-half/statement.en.md) | [中文](topics/data-structures/interval-top-half/solution.zh.md) · [English](topics/data-structures/interval-top-half/solution.en.md) | | 数据结构 | 分批操作的向前弹跳 | [中文](topics/data-structures/lazy-forward-jumps/statement.zh.md) · [English](topics/data-structures/lazy-forward-jumps/statement.en.md) | [中文](topics/data-structures/lazy-forward-jumps/solution.zh.md) · [English](topics/data-structures/lazy-forward-jumps/solution.en.md) | | 数据结构 | 直线上的容量运输 | [中文](topics/data-structures/line-capacity-transport/statement.zh.md) · [English](topics/data-structures/line-capacity-transport/statement.en.md) | [中文](topics/data-structures/line-capacity-transport/solution.zh.md) · [English](topics/data-structures/line-capacity-transport/solution.en.md) | | 数据结构 | 抽奖插件 | [中文](topics/data-structures/lottery-plugin/statement.zh.md) · [English](topics/data-structures/lottery-plugin/statement.en.md) | [中文](topics/data-structures/lottery-plugin/solution.zh.md) · [English](topics/data-structures/lottery-plugin/solution.en.md) | | 数据结构 | 最小值加权的区间和 | [中文](topics/data-structures/minimum-weighted-subarrays/statement.zh.md) · [English](topics/data-structures/minimum-weighted-subarrays/statement.en.md) | [中文](topics/data-structures/minimum-weighted-subarrays/solution.zh.md) · [English](topics/data-structures/minimum-weighted-subarrays/solution.en.md) | | 数据结构 | 纳米电脑主机 | [中文](topics/data-structures/nano-computer/statement.zh.md) · [English](topics/data-structures/nano-computer/statement.en.md) | [中文](topics/data-structures/nano-computer/solution.zh.md) · [English](topics/data-structures/nano-computer/solution.en.md) | | 数据结构 | 心灵突击队 | [中文](topics/data-structures/psychic-commando/statement.zh.md) · [English](topics/data-structures/psychic-commando/statement.en.md) | [中文](topics/data-structures/psychic-commando/solution.zh.md) · [English](topics/data-structures/psychic-commando/solution.en.md) | | 数据结构 | 用多个栈实现队列 | [中文](topics/data-structures/queue-with-stacks/statement.zh.md) · [English](topics/data-structures/queue-with-stacks/statement.en.md) | [中文](topics/data-structures/queue-with-stacks/solution.zh.md) · [English](topics/data-structures/queue-with-stacks/solution.en.md) | | 数据结构 | 小Y的线段树 | [中文](topics/data-structures/little-y-segment-tree/statement.zh.md) · [English](topics/data-structures/little-y-segment-tree/statement.en.md) | [中文](topics/data-structures/little-y-segment-tree/solution.zh.md) · [English](topics/data-structures/little-y-segment-tree/solution.en.md) | | 数据结构 | 异星工厂:机器人指令平台 | [中文](topics/data-structures/robot-platforms/statement.zh.md) · [English](topics/data-structures/robot-platforms/statement.en.md) | [中文](topics/data-structures/robot-platforms/solution.zh.md) · [English](topics/data-structures/robot-platforms/solution.en.md) | | 数据结构 | 选择后缀元素的排序 | [中文](topics/data-structures/selective-suffix-sort/statement.zh.md) · [English](topics/data-structures/selective-suffix-sort/statement.en.md) | [中文](topics/data-structures/selective-suffix-sort/solution.zh.md) · [English](topics/data-structures/selective-suffix-sort/solution.en.md) | | 数据结构 | 简单合并 | [中文](topics/data-structures/simple-merge/statement.zh.md) · [English](topics/data-structures/simple-merge/statement.en.md) | [中文](topics/data-structures/simple-merge/solution.zh.md) · [English](topics/data-structures/simple-merge/solution.en.md) | | 数据结构 | 插火把 | [中文](topics/data-structures/torch-light/statement.zh.md) · [English](topics/data-structures/torch-light/statement.en.md) | [中文](topics/data-structures/torch-light/solution.zh.md) · [English](topics/data-structures/torch-light/solution.en.md) | | 数据结构 | 真空内爆弹 | [中文](topics/data-structures/vacuum-imploder/statement.zh.md) · [English](topics/data-structures/vacuum-imploder/statement.en.md) | [中文](topics/data-structures/vacuum-imploder/solution.zh.md) · [English](topics/data-structures/vacuum-imploder/solution.en.md) | | 数据结构 | 变量列表 | [中文](topics/data-structures/variable-lists/statement.zh.md) · [English](topics/data-structures/variable-lists/statement.en.md) | [中文](topics/data-structures/variable-lists/solution.zh.md) · [English](topics/data-structures/variable-lists/solution.en.md) | | 数据结构 | 端倪发生器 | [中文](topics/data-structures/clue-generator/statement.zh.md) · [English](topics/data-structures/clue-generator/statement.en.md) | [中文](topics/data-structures/clue-generator/solution.zh.md) · [English](topics/data-structures/clue-generator/solution.en.md) | | 动态规划 | 优选猫咪 | [中文](topics/dynamic-programming/cat-selection/statement.zh.md) · [English](topics/dynamic-programming/cat-selection/statement.en.md) | [中文](topics/dynamic-programming/cat-selection/solution.zh.md) · [English](topics/dynamic-programming/cat-selection/solution.en.md) | | 动态规划 | 不同顺子的牌组划分 | [中文](topics/dynamic-programming/distinct-tile-runs/statement.zh.md) · [English](topics/dynamic-programming/distinct-tile-runs/statement.en.md) | [中文](topics/dynamic-programming/distinct-tile-runs/solution.zh.md) · [English](topics/dynamic-programming/distinct-tile-runs/solution.en.md) | | 动态规划 | 菁英战斗兵 | [中文](topics/dynamic-programming/elite-combatant/statement.zh.md) · [English](topics/dynamic-programming/elite-combatant/statement.en.md) | [中文](topics/dynamic-programming/elite-combatant/solution.zh.md) · [English](topics/dynamic-programming/elite-combatant/solution.en.md) | | 动态规划 | 有限体力的路线计数 | [中文](topics/dynamic-programming/energy-limited-routes/statement.zh.md) · [English](topics/dynamic-programming/energy-limited-routes/statement.en.md) | [中文](topics/dynamic-programming/energy-limited-routes/solution.zh.md) · [English](topics/dynamic-programming/energy-limited-routes/solution.en.md) | | 动态规划 | 基因突变 | [中文](topics/dynamic-programming/gene-mutation/statement.zh.md) · [English](topics/dynamic-programming/gene-mutation/statement.en.md) | [中文](topics/dynamic-programming/gene-mutation/solution.zh.md) · [English](topics/dynamic-programming/gene-mutation/solution.en.md) | | 动态规划 | 限量补给的旅程 | [中文](topics/dynamic-programming/limited-refueling/statement.zh.md) · [English](topics/dynamic-programming/limited-refueling/statement.en.md) | [中文](topics/dynamic-programming/limited-refueling/solution.zh.md) · [English](topics/dynamic-programming/limited-refueling/solution.en.md) | | 动态规划 | 种西瓜 3 | [中文](topics/dynamic-programming/melon-planting-3/statement.zh.md) · [English](topics/dynamic-programming/melon-planting-3/statement.en.md) | [中文](topics/dynamic-programming/melon-planting-3/solution.zh.md) · [English](topics/dynamic-programming/melon-planting-3/solution.en.md) | | 动态规划 | 最优二叉检索树 | [中文](topics/dynamic-programming/optimal-search-tree/statement.zh.md) · [English](topics/dynamic-programming/optimal-search-tree/statement.en.md) | [中文](topics/dynamic-programming/optimal-search-tree/solution.zh.md) · [English](topics/dynamic-programming/optimal-search-tree/solution.en.md) | | 动态规划 | 剪羊毛 | [中文](topics/dynamic-programming/potion-wool/statement.zh.md) · [English](topics/dynamic-programming/potion-wool/statement.en.md) | [中文](topics/dynamic-programming/potion-wool/solution.zh.md) · [English](topics/dynamic-programming/potion-wool/solution.en.md) | | 动态规划 | 牌组前缀的可行划分 | [中文](topics/dynamic-programming/prefix-tile-groups/statement.zh.md) · [English](topics/dynamic-programming/prefix-tile-groups/statement.en.md) | [中文](topics/dynamic-programming/prefix-tile-groups/solution.zh.md) · [English](topics/dynamic-programming/prefix-tile-groups/solution.en.md) | | 动态规划 | 无标号容器分配 | [中文](topics/dynamic-programming/unlabeled-distributions/statement.zh.md) · [English](topics/dynamic-programming/unlabeled-distributions/statement.en.md) | [中文](topics/dynamic-programming/unlabeled-distributions/solution.zh.md) · [English](topics/dynamic-programming/unlabeled-distributions/solution.en.md) | | 动态规划 | 升级工具箱 | [中文](topics/dynamic-programming/upgrade-toolkit/statement.zh.md) · [English](topics/dynamic-programming/upgrade-toolkit/statement.en.md) | [中文](topics/dynamic-programming/upgrade-toolkit/solution.zh.md) · [English](topics/dynamic-programming/upgrade-toolkit/solution.en.md) | | 博弈 | 可修改环上的边权游戏 | [中文](topics/games/dynamic-cycle-edge-game/statement.zh.md) · [English](topics/games/dynamic-cycle-edge-game/statement.en.md) | [中文](topics/games/dynamic-cycle-edge-game/solution.zh.md) · [English](topics/games/dynamic-cycle-edge-game/solution.en.md) | | 计算几何 | 游耕者(昼) | [中文](topics/geometry/nomadism-day/statement.zh.md) · [English](topics/geometry/nomadism-day/statement.en.md) | [中文](topics/geometry/nomadism-day/solution.zh.md) · [English](topics/geometry/nomadism-day/solution.en.md) | | 计算几何 | 游耕者(夜) | [中文](topics/geometry/nomadism-night/statement.zh.md) · [English](topics/geometry/nomadism-night/statement.en.md) | [中文](topics/geometry/nomadism-night/solution.zh.md) · [English](topics/geometry/nomadism-night/solution.en.md) | | 计算几何 | 星际订单:交集分类 | [中文](topics/geometry/rectangle-intersection-type/statement.zh.md) · [English](topics/geometry/rectangle-intersection-type/statement.en.md) | [中文](topics/geometry/rectangle-intersection-type/solution.zh.md) · [English](topics/geometry/rectangle-intersection-type/solution.en.md) | | 计算几何 | 星际订单:矩形相交 | [中文](topics/geometry/rectangle-intersection/statement.zh.md) · [English](topics/geometry/rectangle-intersection/statement.en.md) | [中文](topics/geometry/rectangle-intersection/solution.zh.md) · [English](topics/geometry/rectangle-intersection/solution.en.md) | | 计算几何 | 麦田选址 | [中文](topics/geometry/wheat-field/statement.zh.md) · [English](topics/geometry/wheat-field/statement.en.md) | [中文](topics/geometry/wheat-field/solution.zh.md) · [English](topics/geometry/wheat-field/solution.en.md) | | 图论 | 自动接线器 | [中文](topics/graphs/auto-wiring/statement.zh.md) · [English](topics/graphs/auto-wiring/statement.en.md) | [中文](topics/graphs/auto-wiring/solution.zh.md) · [English](topics/graphs/auto-wiring/solution.en.md) | | 图论 | 转动的字节 | [中文](topics/graphs/rotating-bytes/statement.zh.md) · [English](topics/graphs/rotating-bytes/statement.en.md) | [中文](topics/graphs/rotating-bytes/solution.zh.md) · [English](topics/graphs/rotating-bytes/solution.en.md) | | 图论 | 修桥笑传之坚决不用第一版方案 | [中文](topics/graphs/bridge-tales-no-first-plan/statement.zh.md) · [English](topics/graphs/bridge-tales-no-first-plan/statement.en.md) | [中文](topics/graphs/bridge-tales-no-first-plan/solution.zh.md) · [English](topics/graphs/bridge-tales-no-first-plan/solution.en.md) | | 图论 | 神经突击车 | [中文](topics/graphs/chaos-drone/statement.zh.md) · [English](topics/graphs/chaos-drone/statement.en.md) | [中文](topics/graphs/chaos-drone/solution.zh.md) · [English](topics/graphs/chaos-drone/solution.en.md) | | 图论 | 超时空军团 | [中文](topics/graphs/chrono-legion/statement.zh.md) · [English](topics/graphs/chrono-legion/statement.en.md) | [中文](topics/graphs/chrono-legion/solution.zh.md) · [English](topics/graphs/chrono-legion/solution.en.md) | | 图论 | 覆盖所有道路的巡检 | [中文](topics/graphs/closed-edge-survey/statement.zh.md) · [English](topics/graphs/closed-edge-survey/statement.en.md) | [中文](topics/graphs/closed-edge-survey/solution.zh.md) · [English](topics/graphs/closed-edge-survey/solution.en.md) | | 图论 | 多棵树中的共同连通集 | [中文](topics/graphs/common-tree-subset/statement.zh.md) · [English](topics/graphs/common-tree-subset/statement.en.md) | [中文](topics/graphs/common-tree-subset/solution.zh.md) · [English](topics/graphs/common-tree-subset/solution.en.md) | | 图论 | 下坡路线计数 | [中文](topics/graphs/downhill-routes/statement.zh.md) · [English](topics/graphs/downhill-routes/statement.en.md) | [中文](topics/graphs/downhill-routes/solution.zh.md) · [English](topics/graphs/downhill-routes/solution.en.md) | | 图论 | 加密数据包与网络清空 | [中文](topics/graphs/encrypted-reset-network/statement.zh.md) · [English](topics/graphs/encrypted-reset-network/statement.en.md) | [中文](topics/graphs/encrypted-reset-network/solution.zh.md) · [English](topics/graphs/encrypted-reset-network/solution.en.md) | | 图论 | 滴嘟hia的能指循环 | [中文](topics/graphs/didu-hia-signifier-cycles/statement.zh.md) · [English](topics/graphs/didu-hia-signifier-cycles/statement.en.md) | [中文](topics/graphs/didu-hia-signifier-cycles/solution.zh.md) · [English](topics/graphs/didu-hia-signifier-cycles/solution.en.md) | | 图论 | 拨号关系的补全 | [中文](topics/graphs/lattice-completion/statement.zh.md) · [English](topics/graphs/lattice-completion/statement.en.md) | [中文](topics/graphs/lattice-completion/solution.zh.md) · [English](topics/graphs/lattice-completion/solution.en.md) | | 图论 | 种西瓜 2 | [中文](topics/graphs/melon-planting-2/statement.zh.md) · [English](topics/graphs/melon-planting-2/statement.en.md) | [中文](topics/graphs/melon-planting-2/solution.zh.md) · [English](topics/graphs/melon-planting-2/solution.en.md) | | 图论 | 种西瓜 | [中文](topics/graphs/melon-planting/statement.zh.md) · [English](topics/graphs/melon-planting/statement.en.md) | [中文](topics/graphs/melon-planting/solution.zh.md) · [English](topics/graphs/melon-planting/solution.en.md) | | 图论 | 终点和起点 | [中文](topics/graphs/nearest-terminal-sets/statement.zh.md) · [English](topics/graphs/nearest-terminal-sets/statement.en.md) | [中文](topics/graphs/nearest-terminal-sets/solution.zh.md) · [English](topics/graphs/nearest-terminal-sets/solution.en.md) | | 图论 | 红石计算机 | [中文](topics/graphs/redstone-computer/statement.zh.md) · [English](topics/graphs/redstone-computer/statement.en.md) | [中文](topics/graphs/redstone-computer/solution.zh.md) · [English](topics/graphs/redstone-computer/solution.en.md) | | 图论 | 两类最短路查询 | [中文](topics/graphs/shortest-path-queries/statement.zh.md) · [English](topics/graphs/shortest-path-queries/statement.en.md) | [中文](topics/graphs/shortest-path-queries/solution.zh.md) · [English](topics/graphs/shortest-path-queries/solution.en.md) | | 图论 | 异星工厂:简单火车 | [中文](topics/graphs/simple-rail-network/statement.zh.md) · [English](topics/graphs/simple-rail-network/statement.en.md) | [中文](topics/graphs/simple-rail-network/solution.zh.md) · [English](topics/graphs/simple-rail-network/solution.en.md) | | 图论 | Spode经学院 | [中文](topics/graphs/spode-seminary/statement.zh.md) · [English](topics/graphs/spode-seminary/statement.en.md) | [中文](topics/graphs/spode-seminary/solution.zh.md) · [English](topics/graphs/spode-seminary/solution.en.md) | | 图论 | 异星工厂:科技树 | [中文](topics/graphs/technology-tree/statement.zh.md) · [English](topics/graphs/technology-tree/statement.en.md) | [中文](topics/graphs/technology-tree/solution.zh.md) · [English](topics/graphs/technology-tree/solution.en.md) | | 图论 | 恐怖机器人 | [中文](topics/graphs/terror-drone/statement.zh.md) · [English](topics/graphs/terror-drone/statement.en.md) | [中文](topics/graphs/terror-drone/solution.zh.md) · [English](topics/graphs/terror-drone/solution.en.md) | | 图论 | 旅游安排 | [中文](topics/graphs/tour-planning/statement.zh.md) · [English](topics/graphs/tour-planning/statement.en.md) | [中文](topics/graphs/tour-planning/solution.zh.md) · [English](topics/graphs/tour-planning/solution.en.md) | | 图论 | 两色徽章 | [中文](topics/graphs/two-color-badges/statement.zh.md) · [English](topics/graphs/two-color-badges/statement.en.md) | [中文](topics/graphs/two-color-badges/solution.zh.md) · [English](topics/graphs/two-color-badges/solution.en.md) | | 图论 | 白雪公主 | [中文](topics/graphs/snow-white/statement.zh.md) · [English](topics/graphs/snow-white/statement.en.md) | [中文](topics/graphs/snow-white/solution.zh.md) · [English](topics/graphs/snow-white/solution.en.md) | | 图论 | 地狱门 | [中文](topics/graphs/nether-portal/statement.zh.md) · [English](topics/graphs/nether-portal/statement.en.md) | [中文](topics/graphs/nether-portal/solution.zh.md) · [English](topics/graphs/nether-portal/solution.en.md) | | 贪心 | 数位合并的最大值与最小值 | [中文](topics/greedy/digit-merge-extremes/statement.zh.md) · [English](topics/greedy/digit-merge-extremes/statement.en.md) | [中文](topics/greedy/digit-merge-extremes/solution.zh.md) · [English](topics/greedy/digit-merge-extremes/solution.en.md) | | 贪心 | 编辑城镇与模拟币 | [中文](topics/greedy/single-member-household/statement.zh.md) · [English](topics/greedy/single-member-household/statement.en.md) | [中文](topics/greedy/single-member-household/solution.zh.md) · [English](topics/greedy/single-member-household/solution.en.md) | | 贪心 | 编辑城镇与模拟币2 | [中文](topics/greedy/town-editing-simoleons-2/statement.zh.md) · [English](topics/greedy/town-editing-simoleons-2/statement.en.md) | [中文](topics/greedy/town-editing-simoleons-2/solution.zh.md) · [English](topics/greedy/town-editing-simoleons-2/solution.en.md) | | 贪心 | 编辑城镇与模拟币3 | [中文](topics/greedy/town-editing-simoleons-3/statement.zh.md) · [English](topics/greedy/town-editing-simoleons-3/statement.en.md) | [中文](topics/greedy/town-editing-simoleons-3/solution.zh.md) · [English](topics/greedy/town-editing-simoleons-3/solution.en.md) | | 贪心 | 编辑城镇与模拟币4 | [中文](topics/greedy/town-editing-simoleons-4/statement.zh.md) · [English](topics/greedy/town-editing-simoleons-4/statement.en.md) | [中文](topics/greedy/town-editing-simoleons-4/solution.zh.md) · [English](topics/greedy/town-editing-simoleons-4/solution.en.md) | | 贪心 | 编辑城镇与模拟币5 | [中文](topics/greedy/town-editing-simoleons-5/statement.zh.md) · [English](topics/greedy/town-editing-simoleons-5/statement.en.md) | [中文](topics/greedy/town-editing-simoleons-5/solution.zh.md) · [English](topics/greedy/town-editing-simoleons-5/solution.en.md) | | 贪心 | 树上设备的拆除顺序 | [中文](topics/greedy/tree-demolition/statement.zh.md) · [English](topics/greedy/tree-demolition/statement.en.md) | [中文](topics/greedy/tree-demolition/solution.zh.md) · [English](topics/greedy/tree-demolition/solution.en.md) | | 交互 | 子串询问恢复排列 | [中文](topics/interactive/substring-permutation/statement.zh.md) · [English](topics/interactive/substring-permutation/statement.en.md) | [中文](topics/interactive/substring-permutation/solution.zh.md) · [English](topics/interactive/substring-permutation/solution.en.md) | | 线性代数 | Grox的序列六 | [中文](topics/linear-algebra/grox-sequence-6/statement.zh.md) · [English](topics/linear-algebra/grox-sequence-6/statement.en.md) | [中文](topics/linear-algebra/grox-sequence-6/solution.zh.md) · [English](topics/linear-algebra/grox-sequence-6/solution.en.md) | | 线性代数 | Grox的序列七 | [中文](topics/linear-algebra/grox-sequence-7/statement.zh.md) · [English](topics/linear-algebra/grox-sequence-7/statement.en.md) | [中文](topics/linear-algebra/grox-sequence-7/solution.zh.md) · [English](topics/linear-algebra/grox-sequence-7/solution.en.md) | | 线性代数 | 病毒狙击手 | [中文](topics/linear-algebra/virus-sniper/statement.zh.md) · [English](topics/linear-algebra/virus-sniper/statement.en.md) | [中文](topics/linear-algebra/virus-sniper/solution.zh.md) · [English](topics/linear-algebra/virus-sniper/solution.en.md) | | 逻辑 | 异星工厂:测试电路板 | [中文](topics/logic/circuit-board-test/statement.zh.md) · [English](topics/logic/circuit-board-test/statement.en.md) | [中文](topics/logic/circuit-board-test/solution.zh.md) · [English](topics/logic/circuit-board-test/solution.en.md) | | 逻辑 | 识别符号格 | [中文](topics/logic/lattice-recognition/statement.zh.md) · [English](topics/logic/lattice-recognition/statement.en.md) | [中文](topics/logic/lattice-recognition/solution.zh.md) · [English](topics/logic/lattice-recognition/solution.en.md) | | 逻辑 | 作物解锁条件 | [中文](topics/logic/monotone-unlocks/statement.zh.md) · [English](topics/logic/monotone-unlocks/statement.en.md) | [中文](topics/logic/monotone-unlocks/solution.zh.md) · [English](topics/logic/monotone-unlocks/solution.en.md) | | 数论 | 农务署 | [中文](topics/number-theory/agricultural-ratios/statement.zh.md) · [English](topics/number-theory/agricultural-ratios/statement.en.md) | [中文](topics/number-theory/agricultural-ratios/solution.zh.md) · [English](topics/number-theory/agricultural-ratios/solution.en.md) | | 数论 | 某不科学的等差等比加权和 | [中文](topics/number-theory/arithmetic-geometric-sum/statement.zh.md) · [English](topics/number-theory/arithmetic-geometric-sum/statement.en.md) | [中文](topics/number-theory/arithmetic-geometric-sum/solution.zh.md) · [English](topics/number-theory/arithmetic-geometric-sum/solution.en.md) | | 数论 | 某不科学的立方盒中的最大公约数累计 | [中文](topics/number-theory/box-gcd-prefix-sum/statement.zh.md) · [English](topics/number-theory/box-gcd-prefix-sum/statement.en.md) | [中文](topics/number-theory/box-gcd-prefix-sum/solution.zh.md) · [English](topics/number-theory/box-gcd-prefix-sum/solution.en.md) | | 数论 | 某不科学的多项式加权几何和的修改 | [中文](topics/number-theory/dynamic-polynomial-geometric-sum/statement.zh.md) · [English](topics/number-theory/dynamic-polynomial-geometric-sum/statement.en.md) | [中文](topics/number-theory/dynamic-polynomial-geometric-sum/solution.zh.md) · [English](topics/number-theory/dynamic-polynomial-geometric-sum/solution.en.md) | | 数论 | 装备增幅 | [中文](topics/number-theory/equipment-amplification/statement.zh.md) · [English](topics/number-theory/equipment-amplification/statement.en.md) | [中文](topics/number-theory/equipment-amplification/solution.zh.md) · [English](topics/number-theory/equipment-amplification/solution.en.md) | | 数论 | 使徒卢克的密码 | [中文](topics/number-theory/apostle-luke-password/statement.zh.md) · [English](topics/number-theory/apostle-luke-password/statement.en.md) | [中文](topics/number-theory/apostle-luke-password/solution.zh.md) · [English](topics/number-theory/apostle-luke-password/solution.en.md) | | 数论 | 数据恢复 | [中文](topics/number-theory/factorial-recovery/statement.zh.md) · [English](topics/number-theory/factorial-recovery/statement.en.md) | [中文](topics/number-theory/factorial-recovery/solution.zh.md) · [English](topics/number-theory/factorial-recovery/solution.en.md) | | 数论 | 某不科学的下降阶乘与二项式求和 | [中文](topics/number-theory/falling-factorial-binomial-sum/statement.zh.md) · [English](topics/number-theory/falling-factorial-binomial-sum/statement.en.md) | [中文](topics/number-theory/falling-factorial-binomial-sum/solution.zh.md) · [English](topics/number-theory/falling-factorial-binomial-sum/solution.en.md) | | 数论 | Grox的序列三 | [中文](topics/number-theory/grox-sequence-3/statement.zh.md) · [English](topics/number-theory/grox-sequence-3/statement.en.md) | [中文](topics/number-theory/grox-sequence-3/solution.zh.md) · [English](topics/number-theory/grox-sequence-3/solution.en.md) | | 数论 | 猜公因子 | [中文](topics/number-theory/guess-common-divisor/statement.zh.md) · [English](topics/number-theory/guess-common-divisor/statement.en.md) | [中文](topics/number-theory/guess-common-divisor/solution.zh.md) · [English](topics/number-theory/guess-common-divisor/solution.en.md) | | 数论 | 老yd与并查集 | [中文](topics/number-theory/old-yd-disjoint-set/statement.zh.md) · [English](topics/number-theory/old-yd-disjoint-set/statement.en.md) | [中文](topics/number-theory/old-yd-disjoint-set/solution.zh.md) · [English](topics/number-theory/old-yd-disjoint-set/solution.en.md) | | 数论 | 某不科学的单调序列的最大公约数之和 | [中文](topics/number-theory/monotone-gcd-sum/statement.zh.md) · [English](topics/number-theory/monotone-gcd-sum/statement.en.md) | [中文](topics/number-theory/monotone-gcd-sum/solution.zh.md) · [English](topics/number-theory/monotone-gcd-sum/solution.en.md) | | 数论 | 某不科学的多重等比求和 | [中文](topics/number-theory/nested-geometric-sum/statement.zh.md) · [English](topics/number-theory/nested-geometric-sum/statement.en.md) | [中文](topics/number-theory/nested-geometric-sum/solution.zh.md) · [English](topics/number-theory/nested-geometric-sum/solution.en.md) | | 数论 | 烤墨鱼的置换 | [中文](topics/number-theory/permutation-order/statement.zh.md) · [English](topics/number-theory/permutation-order/statement.en.md) | [中文](topics/number-theory/permutation-order/solution.zh.md) · [English](topics/number-theory/permutation-order/solution.en.md) | | 数论 | 简单分析 | [中文](topics/number-theory/power-call-count/statement.zh.md) · [English](topics/number-theory/power-call-count/statement.en.md) | [中文](topics/number-theory/power-call-count/solution.zh.md) · [English](topics/number-theory/power-call-count/solution.en.md) | | 数论 | 简单统计 | [中文](topics/number-theory/recursive-statistics/statement.zh.md) · [English](topics/number-theory/recursive-statistics/statement.en.md) | [中文](topics/number-theory/recursive-statistics/solution.zh.md) · [English](topics/number-theory/recursive-statistics/solution.en.md) | | 数论 | 红石钟 | [中文](topics/number-theory/redstone-clock/statement.zh.md) · [English](topics/number-theory/redstone-clock/statement.en.md) | [中文](topics/number-theory/redstone-clock/solution.zh.md) · [English](topics/number-theory/redstone-clock/solution.en.md) | | 优化 | 战斗属性的升级计划 | [中文](topics/optimization/battle-upgrades/statement.zh.md) · [English](topics/optimization/battle-upgrades/statement.en.md) | [中文](topics/optimization/battle-upgrades/solution.zh.md) · [English](topics/optimization/battle-upgrades/solution.en.md) | | 优化 | 世纪轰炸机 | [中文](topics/optimization/century-bomber/statement.zh.md) · [English](topics/optimization/century-bomber/statement.en.md) | [中文](topics/optimization/century-bomber/solution.zh.md) · [English](topics/optimization/century-bomber/solution.en.md) | | 优化 | 力场护盾 | [中文](topics/optimization/force-shield/statement.zh.md) · [English](topics/optimization/force-shield/statement.en.md) | [中文](topics/optimization/force-shield/solution.zh.md) · [English](topics/optimization/force-shield/solution.en.md) | | 优化 | 坐地铁 | [中文](topics/optimization/metro-delivery/statement.zh.md) · [English](topics/optimization/metro-delivery/statement.en.md) | [中文](topics/optimization/metro-delivery/solution.zh.md) · [English](topics/optimization/metro-delivery/solution.en.md) | | 优化 | 乘客需要多运动 | [中文](topics/optimization/passengers-need-exercise/statement.zh.md) · [English](topics/optimization/passengers-need-exercise/statement.en.md) | [中文](topics/optimization/passengers-need-exercise/solution.zh.md) · [English](topics/optimization/passengers-need-exercise/solution.en.md) | | 优化 | 直线上的服务站 | [中文](topics/optimization/postal-facilities/statement.zh.md) · [English](topics/optimization/postal-facilities/statement.en.md) | [中文](topics/optimization/postal-facilities/solution.zh.md) · [English](topics/optimization/postal-facilities/solution.en.md) | | 优化 | 时间管理与多人运动 | [中文](topics/optimization/time-management-and-team-sports/statement.zh.md) · [English](topics/optimization/time-management-and-team-sports/statement.en.md) | [中文](topics/optimization/time-management-and-team-sports/solution.zh.md) · [English](topics/optimization/time-management-and-team-sports/solution.en.md) | | 优化 | 红心女王的扑克士兵 | [中文](topics/optimization/queen-of-hearts-card-soldiers/statement.zh.md) · [English](topics/optimization/queen-of-hearts-card-soldiers/statement.en.md) | [中文](topics/optimization/queen-of-hearts-card-soldiers/solution.zh.md) · [English](topics/optimization/queen-of-hearts-card-soldiers/solution.en.md) | | 优化 | 短板翻盘 | [中文](topics/optimization/weak-link-comeback/statement.zh.md) · [English](topics/optimization/weak-link-comeback/statement.en.md) | [中文](topics/optimization/weak-link-comeback/solution.zh.md) · [English](topics/optimization/weak-link-comeback/solution.en.md) | | 语法分析 | 带短路规则的运算器 | [中文](topics/parsing/short-circuit-calculator/statement.zh.md) · [English](topics/parsing/short-circuit-calculator/statement.en.md) | [中文](topics/parsing/short-circuit-calculator/solution.zh.md) · [English](topics/parsing/short-circuit-calculator/solution.en.md) | | 语法分析 | 整数运算器 | [中文](topics/parsing/small-integer-calculator/statement.zh.md) · [English](topics/parsing/small-integer-calculator/statement.en.md) | [中文](topics/parsing/small-integer-calculator/solution.zh.md) · [English](topics/parsing/small-integer-calculator/solution.en.md) | | 排列 | 排列的字典序跳转 | [中文](topics/permutations/lexicographic-jump/statement.zh.md) · [English](topics/permutations/lexicographic-jump/statement.en.md) | [中文](topics/permutations/lexicographic-jump/solution.zh.md) · [English](topics/permutations/lexicographic-jump/solution.en.md) | | 概率与期望 | 网格生存概率 | [中文](topics/probability/grid-survival/statement.zh.md) · [English](topics/probability/grid-survival/statement.en.md) | [中文](topics/probability/grid-survival/solution.zh.md) · [English](topics/probability/grid-survival/solution.en.md) | | 概率与期望 | 随机分析:概率 | [中文](topics/probability/shuffle-distribution/statement.zh.md) · [English](topics/probability/shuffle-distribution/statement.en.md) | [中文](topics/probability/shuffle-distribution/solution.zh.md) · [English](topics/probability/shuffle-distribution/solution.en.md) | | 概率与期望 | 随机分析:期望 | [中文](topics/probability/shuffle-expectation/statement.zh.md) · [English](topics/probability/shuffle-expectation/statement.en.md) | [中文](topics/probability/shuffle-expectation/solution.zh.md) · [English](topics/probability/shuffle-expectation/solution.en.md) | | 概率与期望 | 剑与暴击 | [中文](topics/probability/swords-and-crits/statement.zh.md) · [English](topics/probability/swords-and-crits/statement.en.md) | [中文](topics/probability/swords-and-crits/solution.zh.md) · [English](topics/probability/swords-and-crits/solution.en.md) | | 概率与期望 | 唯一特征的命中期望 | [中文](topics/probability/unique-substring-hits/statement.zh.md) · [English](topics/probability/unique-substring-hits/statement.en.md) | [中文](topics/probability/unique-substring-hits/solution.zh.md) · [English](topics/probability/unique-substring-hits/solution.en.md) | | 递归 | 积木塔 | [中文](topics/recursion/block-tower/statement.zh.md) · [English](topics/recursion/block-tower/statement.en.md) | [中文](topics/recursion/block-tower/solution.zh.md) · [English](topics/recursion/block-tower/solution.en.md) | | 递归 | 分数次幂递推 | [中文](topics/recursion/fractional-recurrence/statement.zh.md) · [English](topics/recursion/fractional-recurrence/statement.en.md) | [中文](topics/recursion/fractional-recurrence/solution.zh.md) · [English](topics/recursion/fractional-recurrence/solution.en.md) | | 递归 | 递归训练:最大值 | [中文](topics/recursion/recursive-maximum/statement.zh.md) · [English](topics/recursion/recursive-maximum/statement.en.md) | [中文](topics/recursion/recursive-maximum/solution.zh.md) · [English](topics/recursion/recursive-maximum/solution.en.md) | | 调度 | 共用充电器 | [中文](topics/scheduling/shared-charger/statement.zh.md) · [English](topics/scheduling/shared-charger/statement.en.md) | [中文](topics/scheduling/shared-charger/solution.zh.md) · [English](topics/scheduling/shared-charger/solution.en.md) | | 搜索 | 花园的点击系数 | [中文](topics/search/garden-click-coefficient/statement.zh.md) · [English](topics/search/garden-click-coefficient/statement.en.md) | [中文](topics/search/garden-click-coefficient/solution.zh.md) · [English](topics/search/garden-click-coefficient/solution.en.md) | | 选择算法 | 生成序列中的预算选择 | [中文](topics/selection/generated-budget-selection/statement.zh.md) · [English](topics/selection/generated-budget-selection/statement.en.md) | [中文](topics/selection/generated-budget-selection/solution.zh.md) · [English](topics/selection/generated-budget-selection/solution.en.md) | | 选择算法 | 最接近中位数的数 | [中文](topics/selection/nearest-median/statement.zh.md) · [English](topics/selection/nearest-median/statement.en.md) | [中文](topics/selection/nearest-median/solution.zh.md) · [English](topics/selection/nearest-median/solution.en.md) | | 模拟 | 字符 X | [中文](topics/simulation/character-x/statement.zh.md) · [English](topics/simulation/character-x/statement.en.md) | [中文](topics/simulation/character-x/solution.zh.md) · [English](topics/simulation/character-x/solution.en.md) | | 模拟 | 一类四邻接网格图森林的匹配问题 | [中文](topics/simulation/grid-forest-matching/statement.zh.md) · [English](topics/simulation/grid-forest-matching/statement.en.md) | [中文](topics/simulation/grid-forest-matching/solution.zh.md) · [English](topics/simulation/grid-forest-matching/solution.en.md) | | 模拟 | 异星工厂:搅拌机 | [中文](topics/simulation/matrix-mixer/statement.zh.md) · [English](topics/simulation/matrix-mixer/statement.en.md) | [中文](topics/simulation/matrix-mixer/solution.zh.md) · [English](topics/simulation/matrix-mixer/solution.en.md) | | 模拟 | 连续内存中的字符串函数 | [中文](topics/simulation/memory-functions/statement.zh.md) · [English](topics/simulation/memory-functions/statement.en.md) | [中文](topics/simulation/memory-functions/solution.zh.md) · [English](topics/simulation/memory-functions/solution.en.md) | | 模拟 | 横版场域论 | [中文](topics/simulation/side-scrolling-field-theory/statement.zh.md) · [English](topics/simulation/side-scrolling-field-theory/statement.en.md) | [中文](topics/simulation/side-scrolling-field-theory/solution.zh.md) · [English](topics/simulation/side-scrolling-field-theory/solution.en.md) | | 排序 | 地精排序 | [中文](topics/sorting/gnome-sort/statement.zh.md) · [English](topics/sorting/gnome-sort/statement.en.md) | [中文](topics/sorting/gnome-sort/solution.zh.md) · [English](topics/sorting/gnome-sort/solution.en.md) | | 字符串 | 合成大星星 | [中文](topics/strings/build-a-big-star/statement.zh.md) · [English](topics/strings/build-a-big-star/statement.en.md) | [中文](topics/strings/build-a-big-star/solution.zh.md) · [English](topics/strings/build-a-big-star/solution.en.md) | | 字符串 | 糖果括号 | [中文](topics/strings/candy-brackets/statement.zh.md) · [English](topics/strings/candy-brackets/statement.en.md) | [中文](topics/strings/candy-brackets/solution.zh.md) · [English](topics/strings/candy-brackets/solution.en.md) | | 字符串 | 吃糖果 | [中文](topics/strings/eating-candy/statement.zh.md) · [English](topics/strings/eating-candy/statement.en.md) | [中文](topics/strings/eating-candy/solution.zh.md) · [English](topics/strings/eating-candy/solution.en.md) | | 字符串 | 克隆缸 | [中文](topics/strings/cloning-vat/statement.zh.md) · [English](topics/strings/cloning-vat/statement.en.md) | [中文](topics/strings/cloning-vat/solution.zh.md) · [English](topics/strings/cloning-vat/solution.en.md) | | 字符串 | 旋涡数 | [中文](topics/strings/spiral-numbers/statement.zh.md) · [English](topics/strings/spiral-numbers/statement.en.md) | [中文](topics/strings/spiral-numbers/solution.zh.md) · [English](topics/strings/spiral-numbers/solution.en.md) | | 字符串 | 动态树中的路径独立性 | [中文](topics/strings/dynamic-path-independence/statement.zh.md) · [English](topics/strings/dynamic-path-independence/statement.en.md) | [中文](topics/strings/dynamic-path-independence/solution.zh.md) · [English](topics/strings/dynamic-path-independence/solution.en.md) | | 字符串 | 再来一小段 | [中文](topics/strings/just-a-little-more/statement.zh.md) · [English](topics/strings/just-a-little-more/statement.en.md) | [中文](topics/strings/just-a-little-more/solution.zh.md) · [English](topics/strings/just-a-little-more/solution.en.md) | | 字符串 | 魔法面包 | [中文](topics/strings/magic-bread/statement.zh.md) · [English](topics/strings/magic-bread/statement.en.md) | [中文](topics/strings/magic-bread/solution.zh.md) · [English](topics/strings/magic-bread/solution.en.md) | | 字符串 | 非交叉的1212子序列 | [中文](topics/strings/noncrossing-1212-packing/statement.zh.md) · [English](topics/strings/noncrossing-1212-packing/statement.en.md) | [中文](topics/strings/noncrossing-1212-packing/solution.zh.md) · [English](topics/strings/noncrossing-1212-packing/solution.en.md) | | 字符串 | 纸老虎序列 | [中文](topics/strings/paper-tiger-sequence/statement.zh.md) · [English](topics/strings/paper-tiger-sequence/statement.en.md) | [中文](topics/strings/paper-tiger-sequence/solution.zh.md) · [English](topics/strings/paper-tiger-sequence/solution.en.md) | | 字符串 | 告示牌识别 | [中文](topics/strings/sign-recognition/statement.zh.md) · [English](topics/strings/sign-recognition/statement.en.md) | [中文](topics/strings/sign-recognition/solution.zh.md) · [English](topics/strings/sign-recognition/solution.en.md) | | 字符串 | 疯狂的串串 | [中文](topics/strings/skewer-substrings/statement.zh.md) · [English](topics/strings/skewer-substrings/statement.en.md) | [中文](topics/strings/skewer-substrings/solution.zh.md) · [English](topics/strings/skewer-substrings/solution.en.md) | | 字符串 | 异星工厂:分拣流水线 | [中文](topics/strings/sorting-pipeline/statement.zh.md) · [English](topics/strings/sorting-pipeline/statement.en.md) | [中文](topics/strings/sorting-pipeline/solution.zh.md) · [English](topics/strings/sorting-pipeline/solution.en.md) | | 树 | 祖先子树的分层统计 | [中文](topics/trees/ancestor-depth-counts/statement.zh.md) · [English](topics/trees/ancestor-depth-counts/statement.en.md) | [中文](topics/trees/ancestor-depth-counts/solution.zh.md) · [English](topics/trees/ancestor-depth-counts/solution.en.md) | | 树 | 二叉树遍历 | [中文](topics/trees/binary-traversals/statement.zh.md) · [English](topics/trees/binary-traversals/statement.en.md) | [中文](topics/trees/binary-traversals/solution.zh.md) · [English](topics/trees/binary-traversals/solution.en.md) | | 树 | 菱形衣架的排列 | [中文](topics/trees/diamond-hangers/statement.zh.md) · [English](topics/trees/diamond-hangers/statement.en.md) | [中文](topics/trees/diamond-hangers/solution.zh.md) · [English](topics/trees/diamond-hangers/solution.en.md) | | 树 | 动态目录树 | [中文](topics/trees/dynamic-directory/statement.zh.md) · [English](topics/trees/dynamic-directory/statement.en.md) | [中文](topics/trees/dynamic-directory/solution.zh.md) · [English](topics/trees/dynamic-directory/solution.en.md) | | 树 | 大圣诞树 | [中文](topics/trees/giant-christmas-tree/statement.zh.md) · [English](topics/trees/giant-christmas-tree/statement.en.md) | [中文](topics/trees/giant-christmas-tree/solution.zh.md) · [English](topics/trees/giant-christmas-tree/solution.en.md) | | 树 | 庆典计划 | [中文](topics/trees/festival-plan/statement.zh.md) · [English](topics/trees/festival-plan/statement.en.md) | [中文](topics/trees/festival-plan/solution.zh.md) · [English](topics/trees/festival-plan/solution.en.md) | | 树 | 粉碎者 | [中文](topics/trees/grinder/statement.zh.md) · [English](topics/trees/grinder/statement.en.md) | [中文](topics/trees/grinder/solution.zh.md) · [English](topics/trees/grinder/solution.en.md) | | 树 | 哈根农场 | [中文](topics/trees/hagen-farm/statement.zh.md) · [English](topics/trees/hagen-farm/statement.en.md) | [中文](topics/trees/hagen-farm/solution.zh.md) · [English](topics/trees/hagen-farm/solution.en.md) | | 树 | 无限二叉树上的距离 | [中文](topics/trees/heap-tree-distance/statement.zh.md) · [English](topics/trees/heap-tree-distance/statement.en.md) | [中文](topics/trees/heap-tree-distance/solution.zh.md) · [English](topics/trees/heap-tree-distance/solution.en.md) | | 树 | 字典序最大的树标号 | [中文](topics/trees/lexicographic-heap-labels/statement.zh.md) · [English](topics/trees/lexicographic-heap-labels/statement.en.md) | [中文](topics/trees/lexicographic-heap-labels/solution.zh.md) · [English](topics/trees/lexicographic-heap-labels/solution.en.md) | | 树 | 挖地铁 | [中文](topics/trees/digging-the-subway/statement.zh.md) · [English](topics/trees/digging-the-subway/statement.en.md) | [中文](topics/trees/digging-the-subway/solution.zh.md) · [English](topics/trees/digging-the-subway/solution.en.md) | | 树 | 护林员 | [中文](topics/trees/forest-ranger/statement.zh.md) · [English](topics/trees/forest-ranger/statement.en.md) | [中文](topics/trees/forest-ranger/solution.zh.md) · [English](topics/trees/forest-ranger/solution.en.md) | | 树 | 心灵终结仪 | [中文](topics/trees/path-neighborhood-updates/statement.zh.md) · [English](topics/trees/path-neighborhood-updates/statement.en.md) | [中文](topics/trees/path-neighborhood-updates/solution.zh.md) · [English](topics/trees/path-neighborhood-updates/solution.en.md) | | 树 | 光棱坦克 | [中文](topics/trees/prism-tank/statement.zh.md) · [English](topics/trees/prism-tank/statement.en.md) | [中文](topics/trees/prism-tank/solution.zh.md) · [English](topics/trees/prism-tank/solution.en.md) | | 树 | 心灵支配树 | [中文](topics/trees/psychic-control-tree/statement.zh.md) · [English](topics/trees/psychic-control-tree/statement.en.md) | [中文](topics/trees/psychic-control-tree/solution.zh.md) · [English](topics/trees/psychic-control-tree/solution.en.md) | | 树 | 香料航线 | [中文](topics/trees/spice-routes/statement.zh.md) · [English](topics/trees/spice-routes/statement.en.md) | [中文](topics/trees/spice-routes/solution.zh.md) · [English](topics/trees/spice-routes/solution.en.md) | | 树 | 砍树 | [中文](topics/trees/timber/statement.zh.md) · [English](topics/trees/timber/statement.en.md) | [中文](topics/trees/timber/solution.zh.md) · [English](topics/trees/timber/solution.en.md) | | 树 | 树上的容限路径 | [中文](topics/trees/tolerance-paths/statement.zh.md) · [English](topics/trees/tolerance-paths/statement.en.md) | [中文](topics/trees/tolerance-paths/solution.zh.md) · [English](topics/trees/tolerance-paths/solution.en.md) | ## 使用题目文件 `std.cpp` 是标准程序。另有实现时,`alternative.cpp` 或 `alternative-.cpp` 及对应双语题解说明它的算法与适用范围;部分取舍方案不满足当前完整数据的时限,题解会明确标注。 先在本机以 C++17 编译程序,再在题目目录执行: ```text python tests/generate.py --out-dir <输出目录> --std <已编译的标准程序路径> ``` 省略 `--std` 时只生成输入;`--case <用例编号>` 可只生成指定用例。编号、参数与固定种子见 `tests/plan.json`。生成结果和可执行文件可放在题库的 `build/` 目录。带特殊评测的题目在题解中说明检查器用法。 参考时限与性能数据见[评测环境与性能](docs/评测环境与性能.md)。部署到其他评测环境时,重新测量标准程序的最慢用例中位耗时,乘以题面标注的倍率(默认 2),再按 0.5 秒向上取整。 在题库根目录运行 `python tools/check_statements.py`,可检查双语样例、数据分组、数学转义、文档链接与图片引用。