☰ 成为合作伙伴

CP 每周编程挑战

CP 每周挑战

Weekly CP (Competitive Programming) problems analysis with thinking process, Python/C++ solutions, common mistakes, and learning outcomes.

Channel Archive

本频道最新文章。

先浏览最新资源,再打开文章阅读完整讲解与练习说明。

CP Weekly Challenge | November 21, 2026

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.

阅读全文

CP Weekly Challenge | November 14, 2026

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.

阅读全文

CP Weekly Challenge | November 6, 2026

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.

阅读全文

CP Weekly Challenge | October 31, 2026

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.

阅读全文

CP Weekly Challenge | October 24, 2026

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.

阅读全文

CP Weekly Challenge | October 16, 2026

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.

阅读全文

CP Weekly Challenge | October 9, 2026

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.

阅读全文

CP Weekly Challenge | October 3, 2026

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²).

阅读全文

CP Weekly Challenge | October 2, 2026

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.

阅读全文

CP Weekly Challenge · USACO | September 28, 2026

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 Weekly Challenge | September 23, 2026

CCC 2023 J4/S1 Trianglane Solution & Analysis

通过周长计算、共用边、奇偶性以及 O(C) 的 Python 和 C++ 解法学习 CCC 2023 J4/S1 Trianglane。

阅读全文

CP Weekly Challenge | September 19, 2026

CCC DSA Roadmap: Junior to Senior Algorithms and Data Structures

从 CCC Junior 到 Senior 的数据结构与算法路线图,涵盖模拟、字符串、网格、计数、前缀和、图搜索、贪心、并查集、最短路、动态规划及典型历史题。

阅读全文

CP Weekly Challenge | September 3, 2026

CCC 2020 J5/S2 Escape Room Solution & Analysis

学习使用隐式图上的 BFS、乘积到格子的索引和已访问数值优化,用 Python 与 C++ 解决 Escape Room。

阅读全文

CP Weekly Challenge | August 25, 2026

CCC 2021 J5/S2 Modern Art Solution & Analysis

学习利用奇偶性、行列翻转和 O(M + N + K) 的计数公式,用 Python 与 C++ 解决 Modern Art。

阅读全文

CP Weekly Challenge | 2026 年 7 月 30 日

CCC 2025 J4 Sunny Days 题解:一次修正,最长连续晴天

用 prefix/suffix 连续计数理解一次修正,处理最长连续晴天、全是 S 的特殊情况,并写出 Python/C++ 解法。

阅读全文

CP Weekly Challenge | July 26, 2026

CCC 2025 J5 Connecting Territories 题解与分析

使用动态规划、相邻状态转移和滚动数组,在费用周期重复的网格中求出最小费用路径。

阅读全文

CP Weekly Challenge | July 19, 2026

CCC 2022 J5 Square Pool 题解与分析

根据稀疏的树木坐标枚举左上角位置,并逐步缩小边长,找到最大的空正方形。

阅读全文

CP 每周挑战 | 2026 年 7 月 4 日

CCC 2023 J5 - Word Hunt 解题与分析

使用网格搜索、方向向量和一次直角转弯,统计单词在网格中的所有隐藏出现次数。

阅读全文

CP Weekly Challenge | September 11, 2026

CCC 2024 J5 Harvest Waterloo Solution & Analysis

学习使用连通区域搜索、BFS 和网格累加,用 Python 与 C++ 解决 CCC 2024 J5 Harvest Waterloo。

阅读全文

CP 每周挑战 | 2026 年 6 月 1 日

CCC 2026 J4 - Snail Path 解题与分析

逐步模拟蜗牛移动,用 visited set 记录已经变黏的格子,并统计每一次重新进入旧格子的次数。

阅读全文
CP 每周挑战 | 2026 年 5 月 31 日

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.

CP Weekly Challenge · USACO | September 28, 2026

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 素养文章。

查看资源库

CP ACADEMY

不确定哪些挑战适合你?

通过 CP 测评了解当前起点,选择下一步练习主题。你也可以直接阅读和练习,无需先完成测评。

60 分钟连续作答 · Python 或 C++ · 选择目标比赛

了解我的 CP 水平
滚动至顶部