☰
Partner With Us
CP Weekly Challenge
CP Weekly Challenges
Weekly CP (Competitive Programming) problems analysis with thinking process, Python/C++ solutions, common mistakes, and learning outcomes.
Channel Archive
Latest articles in this channel.
Browse the newest resources first, then open any article for the full explanation and practice notes.
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
Learn CCC 2023 J4/S1 Trianglane with perimeter counting, shared edges, parity, and O(C) Python and C++ solutions.
CCC DSA Roadmap: Junior to Senior Algorithms and Data Structures
A CCC DSA roadmap from Junior to Senior, covering simulation, strings, grids, counting, prefix sums, graph search, greedy, DSU, shortest paths, dynamic programming, and typical historical CCC problems.
CCC 2020 J5/S2 Escape Room Solution & Analysis
Learn how to solve Escape Room with BFS on an implicit graph, product-to-cells indexing, and visited-value optimization in Python and C++.
CCC 2021 J5/S2 Modern Art Solution & Analysis
Learn how to solve Modern Art with parity, row and column toggling, and an O(M + N + K) counting formula in Python and C++.
CCC 2025 J4 Sunny Days Solution & Analysis
Learn how to solve Sunny Days with prefix and suffix streak counts, one-day correction logic, and Python/C++ implementations.
CCC 2025 J5 – Connecting Territories Solution & Analysis
Use dynamic programming, local neighbor transitions, and rolling arrays to find the minimum-cost path through a repeating-cost grid.
CCC 2022 J5 – Square Pool Solution & Analysis
Use sparse tree coordinates, candidate top-left corners, and careful shrinking to find the largest empty square.
CCC 2023 J5 – Word Hunt Solution & Analysis
Use grid search, direction vectors, and one right-angle bend to count every hidden occurrence of a word.
CCC 2024 J5 Harvest Waterloo Solution & Analysis
Learn how to solve CCC 2024 J5 Harvest Waterloo with flood fill, BFS, connected components, and grid accumulation in Python and C++.
CCC 2026 J4 – Snail Path Solution & Analysis
Simulate the snail step by step, track slimy squares with a visited set, and count every revisit.
CCC 2026 J5/S2 – Beams of Light Solution & Analysis
Use interval coverage, a difference array, and prefix sums to answer illumination queries efficiently.
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.
Return to the full Resources hub.
Explore CP Weekly Challenges, Python Learning Notes, and AI Literacy Articles from one place.