☰
成为合作伙伴
CP 每周编程挑战
CP 每周挑战
Weekly CP (Competitive Programming) problems analysis with thinking process, Python/C++ solutions, common mistakes, and learning outcomes.
Channel Archive
本频道最新文章。
先浏览最新资源,再打开文章阅读完整讲解与练习说明。
USACO 2019 January Bronze Shell Game Solution: Simulate Every Starting Position
Track one state variable, simulate all three possible starting shells, and avoid the subtle double-if transition bug.
CCC 2013 J5/S3 Chances of Winning Solution: Enumerate Every Remaining Result
Model every unplayed game as a three-way decision, then count all complete futures where the favourite team finishes strictly first.
CCC 2017 J3 Exactly Electrical Solution: Manhattan Distance and Parity
Use Manhattan distance and parity to decide whether the car can reach its destination while using exactly all available charge.
USACO 2020 December Bronze Daisy Chains Solution: Bounded Enumeration with Exact Average Checks
Enumerate every interval, test whether its average is an integer, and check whether that average appears inside the interval.
CCC 2020 S3 Searching for Strings Solution: Sliding Window, Frequency Signature, Set Deduplication
Use a fixed sliding window and a 26-letter frequency signature, then deduplicate matching permutations with a set.
CCC 2017 J5/S3 Nailed It! Solution: Count Pairs per Height with a Frequency Array
Fix each fence height, count complement pairs with a frequency array, and track how many heights tie for the best fence.
CCC 2016 J5/S2 Tandem Bicycle Solution: Sort First, Then Pairing Has Only One Answer
Sort both teams, pair in the same order for the minimum or opposite order for the maximum, and prove why with an exchange argument.
CCC 2023 S2 Symmetric Mountains Solution: Center Expansion O(N²) | Accel Thinking
Fix each odd or even center, expand outward, and find the minimum asymmetry for every crop length in O(N²).
CCC 2022 J4/S2 Group Work Solution: Hash-Map Constraint Counting | Accel Thinking
Map each name to its group with a dictionary, then count every violated constraint in two linear passes, with Python and C++ solutions.
USACO Mixing Milk Solution: 100-Pour Simulation in Python and C++
Learn the USACO 2018 December Bronze Mixing Milk solution with direct simulation, cyclic updates, invariants, and tested Python and C++ code.
CCC 2023 J4/S1 Trianglane Solution & Analysis
通过周长计算、共用边、奇偶性以及 O(C) 的 Python 和 C++ 解法学习 CCC 2023 J4/S1 Trianglane。
CCC DSA Roadmap: Junior to Senior Algorithms and Data Structures
从 CCC Junior 到 Senior 的数据结构与算法路线图,涵盖模拟、字符串、网格、计数、前缀和、图搜索、贪心、并查集、最短路、动态规划及典型历史题。
CCC 2020 J5/S2 Escape Room Solution & Analysis
学习使用隐式图上的 BFS、乘积到格子的索引和已访问数值优化,用 Python 与 C++ 解决 Escape Room。
CCC 2021 J5/S2 Modern Art Solution & Analysis
学习利用奇偶性、行列翻转和 O(M + N + K) 的计数公式,用 Python 与 C++ 解决 Modern Art。
CCC 2025 J4 Sunny Days 题解:一次修正,最长连续晴天
用 prefix/suffix 连续计数理解一次修正,处理最长连续晴天、全是 S 的特殊情况,并写出 Python/C++ 解法。
CCC 2025 J5 Connecting Territories 题解与分析
使用动态规划、相邻状态转移和滚动数组,在费用周期重复的网格中求出最小费用路径。
CCC 2022 J5 Square Pool 题解与分析
根据稀疏的树木坐标枚举左上角位置,并逐步缩小边长,找到最大的空正方形。
CCC 2023 J5 - Word Hunt 解题与分析
使用网格搜索、方向向量和一次直角转弯,统计单词在网格中的所有隐藏出现次数。
CCC 2024 J5 Harvest Waterloo Solution & Analysis
学习使用连通区域搜索、BFS 和网格累加,用 Python 与 C++ 解决 CCC 2024 J5 Harvest Waterloo。
CCC 2026 J4 - Snail Path 解题与分析
逐步模拟蜗牛移动,用 visited set 记录已经变黏的格子,并统计每一次重新进入旧格子的次数。
CCC 2026 J5/S2 - Beams of Light 解题与分析
使用区间覆盖、差分数组和前缀和,高效回答停车位是否被照亮的查询。
USACO Track
USACO problem walkthroughs.
Selected Bronze and Silver problems that teach transferable simulation, modeling, and algorithmic patterns.
USACO Mixing Milk Solution: 100-Pour Simulation in Python and C++
Learn the USACO 2018 December Bronze Mixing Milk solution with direct simulation, cyclic updates, invariants, and tested Python and C++ code.
返回资源库。
在一个入口浏览 CP 每周挑战、Python 学习笔记和 AI 素养文章。