# 2026年9月算法训练总结

Canonical: https://www.mirstar.net/2026/10/04/algorithm-training-2026-09/
Author: onlymatt
Published: 2026-10-04T02:00:00.000Z
Updated: 2026-10-21T11:21:55.735Z
Categories: Programming, Algorithms
Tags: Training Summary

# 2026年9月算法训练总结

| 平台 | 题数 | 主题分布 |
| --- | --- | --- |
| 洛谷 | 20 | 二分查找/二分答案、BFS/DFS（含组合枚举）、贪心+高精度、校赛模拟 |
| Codeforces | 11（含 2260A 一次二刷，计 12 条记录） | 2260 / 2266 / 2267 场 + 474B + 1201C + 1659B |
| AtCoder | 2 | ABC 475 |

## 一、二分查找与二分答案（洛谷）

### 9月4日 · P2249 查找（洛谷 / 普及-）
- 收获：单调不减序列中查每个数**首次出现位置**，标准二分查找。
- 题目链接：[P2249](https://train.xialiao.org/problem/廖夏/2026-09-04/94fea29f-62f8-4c21-b704-6454adcdf726/)

### 9月5日 · P1102 A-B 数对（洛谷 / 普及-）
- 收获：统计满足 A−B=C 的数对个数（位置不同算不同），排序 + 二分 / 双指针。
- 题目链接：[P1102](https://train.xialiao.org/problem/廖夏/2026-09-05/6f0bea20-4d0b-441b-9281-eb0a24fc86da/)

### 9月5日 · P1873 砍树 EKO（洛谷 / 普及-）
- 收获：伐木机高度最大化，同时砍够 M 米——**二分答案**经典题。
- 题目链接：[P1873](https://train.xialiao.org/problem/廖夏/2026-09-05/c5b23e59-7cf0-4e83-929a-2247736d00bf/)

### 9月7日 · P1024 一元三次方程求解（洛谷 / 入门）
- 收获：[-100,100] 内求三次方程三个实根，**二分 + 根区间判定**，精确到两位小数。
- 题目链接：[P1024](https://train.xialiao.org/problem/廖夏/2026-09-07/63226be5-02bb-46e3-aecf-42904890ed58/)

### 9月7日 · P1678 烦恼的高考志愿（洛谷 / 普及-）
- 收获：为每位学生推荐分数线最近的学校，使总差距最小——**二分查找**。
- 题目链接：[P1678](https://train.xialiao.org/problem/廖夏/2026-09-07/29ebc992-de5a-44b9-95b8-06daec00b6e6/)

### 9月8日 · P2440 木材加工（洛谷 / 普及）
- 收获：把 n 根原木切成长度均为 l 的小段，求 l 最大值——**二分答案**。
- 题目链接：[P2440](https://train.xialiao.org/problem/廖夏/2026-09-08/04f87283-2c30-4c21-ae21-1d1afb6a9511/)

### 9月8日 · P2678 跳石头（洛谷 / 普及）
- 收获：移走若干岩石后使相邻最近距离最大——**二分答案**（最值最优）。
- 题目链接：[P2678](https://train.xialiao.org/problem/廖夏/2026-09-08/5d6a61fb-28ca-4770-9eff-46dfb07ea5c6/)

### 9月9日 · P3853 路标设置（洛谷 / 普及）
- 收获：增设路标使「空旷指数」（最长无路标间隔）最小——**二分答案**。
- 题目链接：[P3853](https://train.xialiao.org/problem/廖夏/2026-09-09/92972833-b704-4eb1-bd53-44ce3e5b34cc/)

### 9月9日 · P1182 数列分段 Section II（洛谷 / 普及）
- 收获：把数列分成 M 段使「每段和的最大值」最小——**二分答案**。
- 题目链接：[P1182](https://train.xialiao.org/problem/廖夏/2026-09-09/9bb76627-1b35-4e47-a991-35ebee26b681/)

### 9月10日 · P1163 银行贷款（洛谷 / 普及-）
- 收获：按月复利偿还固定分期，反推利率——**浮点二分答案**。
- 题目链接：[P1163](https://train.xialiao.org/problem/廖夏/2026-09-10/6a9c84ae-d19d-4028-a59a-44032aebd07c/)

### 9月11日 · P3743 小鸟的设备（洛谷 / 普及）
- 收获：多个设备匀速耗能 + 充电，求最长续航时间——**浮点二分答案**。
- 题目链接：[P3743](https://train.xialiao.org/problem/廖夏/2026-09-11/8dd8bdf9-3b20-40e2-8aa6-60cd1c20d5f0/)

## 二、BFS / DFS 搜索（洛谷）

### 9月18日 · P1219 八皇后 Checker Challenge（洛谷 / ★1300）
- 收获：每行每列、每条对角线至多一个棋子——**回溯 DFS** + 对角线判重。
- 题目链接：[P1219](https://train.xialiao.org/problem/廖夏/2026-09-18/12b92cbf-0c70-4381-bee9-9446c071e305/)

### 9月24日 · P1135 奇怪的电梯（洛谷 / ★1000）
- 收获：电梯每层只能上/下固定层数，求最少按键次数——**BFS 最短路**。
- 题目链接：[P1135](https://train.xialiao.org/problem/廖夏/2026-09-24/2bcb957e-3677-45c7-b1d3-1f719b775d3c/)

### 9月24日 · P1443 马的遍历（洛谷 / ★1000）
- 收获：棋盘上马到任意点的最少步数——**BFS 广度优先**。
- 题目链接：[P1443](https://train.xialiao.org/problem/廖夏/2026-09-24/6267d57d-3af1-42e2-8ea3-db860b9d491b/)

### 9月25日 · P2895 Meteor Shower S（洛谷 / ★1300）
- 收获：流星雨倒计时下逃到安全区的最短时间——**带时间限制的 BFS**。
- 题目链接：[P2895](https://train.xialiao.org/problem/廖夏/2026-09-25/9e3a2136-27ab-4e4e-b9c1-338068bbff1b/)

### 9月28日 · P1036 [NOIP 2002 普及组] 选数（洛谷 / ★1000）
- 收获：n 个数里选 k 个，统计和为素数的方案数——**DFS 枚举组合** + 素数判定（7 月首刷，本月二刷巩固）。
- 题目链接：[P1036](https://train.xialiao.org/problem/廖夏/2026-09-28/9df1da8b-6091-4741-8f48-c0efe0938468/)

## 三、贪心与排序（洛谷）

### 9月1日 · P1080 国王游戏（洛谷 / ★1700）
- 收获：大臣按「左手 × 右手」排序使最大金币最小——**贪心 + 高精度**（本月最难题）。
- 题目链接：[P1080](https://train.xialiao.org/problem/廖夏/2026-09-01/308a8e95-8860-411c-8899-0a71e03a3c93/)

### 9月2日 · P1012 拼数（洛谷 / 普及+/提高-）
- 收获：把若干正整数首尾相接成最大整数——按拼接后字典序**排序贪心**。
- 题目链接：[P1012](https://train.xialiao.org/problem/廖夏/2026-09-02/20e4627e-ae33-4833-9bf6-afed9e823e23/)

### 9月4日 · P4447 分组（洛谷 / 普及+/提高-）
- 收获：连续且无重复的实力值分组，使最小组最大——**贪心**（8 月底同题，二刷巩固）。
- 题目链接：[P4447](https://train.xialiao.org/problem/廖夏/2026-09-04/fd790b0f-5c40-422e-8446-d440b09e7384/)

## 四、Codeforces

### 9月8日 · A. Monocarp's Contest（Codeforces / ≤999，2260A）
- 收获：比赛题首刷，连续做了两遍加深印象。
- 题目链接：[A. Monocarp's Contest](https://train.xialiao.org/problem/廖夏/2026-09-08/43c57edf-2aa9-4169-b919-f53bb16d2f29/)

### 9月8日 · A. Monocarp's Contest（二刷，2260A）
- 收获：同题重做，巩固思路。
- 题目链接：[A. Monocarp's Contest（二刷）](https://train.xialiao.org/problem/廖夏/2026-09-08/522c87fa-78b2-42d7-bbdc-39b96c65d7bc/)

### 9月8日 · B. Monocarp and Projects（Codeforces / ≤999，2260B）
- 收获：比赛 B 题。
- 题目链接：[B. Monocarp and Projects](https://train.xialiao.org/problem/廖夏/2026-09-08/c8ac948e-0dc5-4661-9603-36950ad4b468/)

### 9月14日 · Worms（Codeforces / ★1200，474B）
- 收获：多堆虫数前缀和 + 二分，求标签所在的堆号。
- 题目链接：[Worms](https://train.xialiao.org/problem/廖夏/2026-09-14/782613b8-a8dc-4f11-8d35-eff84c21c375/)

### 9月16日 · Maximum Median（Codeforces / ★1400，1201C）
- 收获：k 次 +1 操作使中位数最大——**二分答案**在竞赛题的迁移。
- 题目链接：[Maximum Median](https://train.xialiao.org/problem/廖夏/2026-09-16/292a2912-58d8-4605-a5ec-5d4156b2d1a1/)

### 9月21日 · A. Good Contest（Codeforces / ★800，2266A）
- 收获：比赛 A 题热身。
- 题目链接：[A. Good Contest](https://train.xialiao.org/problem/廖夏/2026-09-21/8d14a0ef-4fbf-4bd2-9eae-ca2b0ef2bf03/)

### 9月21日 · B. Three Piles（Codeforces / ★1100，2266B）
- 收获：三堆石子博弈/分配，找最优方案。
- 题目链接：[B. Three Piles](https://train.xialiao.org/problem/廖夏/2026-09-21/dd658bf9-ed05-41b5-826f-804d99b1d388/)

### 9月21日 · C. AND, OR, Sort!（Codeforces / ★1300，2266C）
- 收获：二进制串排序/操作题，位运算思维。
- 题目链接：[C. AND, OR, Sort!](https://train.xialiao.org/problem/廖夏/2026-09-21/5d0ef180-d8ab-45e0-a90e-0114a94dcb9b/)

### 9月26日 · A. Turn Into a Palindrome（Codeforces / ★800，2267A）
- 收获：判断/构造回文。
- 题目链接：[A. Turn Into a Palindrome](https://train.xialiao.org/problem/廖夏/2026-09-26/aa927ae9-79dd-4152-9884-2dadaf43747f/)

### 9月26日 · B. Fashionable Array（Codeforces / ★1100，2267B）
- 收获：数组众数/构造题。
- 题目链接：[B. Fashionable Array](https://train.xialiao.org/problem/廖夏/2026-09-26/5c595b67-3c4e-4385-a033-1b4b9e6fff4e/)

### 9月26日 · C. GCD Treasury（Codeforces / ★1300，2267C）
- 收获：GCD 相关的贪心/数论题。
- 题目链接：[C. GCD Treasury](https://train.xialiao.org/problem/廖夏/2026-09-26/cf5d62fc-c0b1-4212-b50f-17627454ba63/)

### 9月27日 · B. Bit Flipping（Codeforces / ★1300，1659B）
- 收获：后缀翻转操作把 01 串变成全 0/全 1 的最少次数——**贪心构造 + 位运算**。
- 题目链接：[B. Bit Flipping](https://train.xialiao.org/problem/廖夏/2026-09-27/93b3dd08-500a-44c2-bbe5-4315240a2fdf/)

## 五、AtCoder

### 9月20日 · A. mnclr（AtCoder / ★800，ABC475-A）
- 收获：象征性打卡，进入 AtCoder 平台。
- 题目链接：[mnclr](https://train.xialiao.org/problem/廖夏/2026-09-20/f913c8d7-b14e-4c94-a7e9-206a23c52066/)

### 9月20日 · B. Change（AtCoder / ★800，ABC475-B）
- 收获：天才般的处理——**取模**！B 题用取模简化。
- 题目链接：[Change](https://train.xialiao.org/problem/廖夏/2026-09-20/d141bb39-9564-48d8-bcf0-60558f5c9883/)

## 六、校赛与杂题

### 9月29日 · P17522 [ECUSTPC 2026 Fall] 时间谜题 2（洛谷 / ★800）
- 收获：校赛 Fall 场的时间/时刻类模拟小题，热身手感。
- 题目链接：[P17522](https://train.xialiao.org/problem/廖夏/2026-09-29/9c62c7e9-aab6-4799-b821-3bba21d5fc89/)
