Past problems archive

A curated selection of recent USACO problems, one to three per division per season. Each entry gives the short problem premise, the key technique, the complexity target, and a link to the official PDF and editorial. For full problem statements always use the canonical source at usaco.org.

How to use this page. Find a problem at your level, open the official statement, give yourself 60 minutes, then come back here for the key idea — and only then read the official editorial.

🥉 Bronze · selected problems

Season · RoundProblemKey ideaTarget complexity
2024 DecemberWalking the CowsSimulation + careful sortingO(n log n)
2024 JanuaryCowmpetencyGreedy + monotonic checkO(n)
2024 FebruaryHoof Paper ScissorsCounting + small state DPO(n)
2024 US OpenThe Lazy CowCoordinate-aware brute forceO(n²)
2023 DecemberCow CollegeSort + scan; "for each price, how many can pay"O(n log n)
2023 JanuaryAir Cownditioning IIBitmask enumeration over fansO(2ᵏ · n)
2022 DecemberCow CollegeSort by price, sweepO(n log n)

🥈 Silver · selected problems

Season · RoundProblemKey ideaTarget complexity
2024 DecemberCake GameTwo pointers / sliding window over a circular arrayO(n)
2024 JanuaryCannonadePrefix sums on event differencesO(n)
2024 FebruarySpore CarryBFS / shortest path with parityO(n)
2024 US OpenSmaller AveragesBinary search on the answerO(n log U)
2023 DecemberTarget PracticeCoordinate compression + simulationO(n log n)
2023 JanuaryAir Cownditioning IIBitmask + prefix difference arrayO(2ᵏ · n)
2022 DecemberCircular BarnGreedy on a circular array; try each startO(n²) or O(n log n)

🥇 Gold · selected problems

Season · RoundProblemKey ideaTarget complexity
2024 DecemberCake GameDP over interval halves; observe symmetryO(n)
2024 JanuaryMooballTree DP + rerootingO(n)
2024 FebruaryMilk ExchangeMonotonic stack + sweepO(n)
2024 US OpenSmaller AveragesInterval DP with prefix sumsO(n³)
2023 DecemberCow Roller CoasterDijkstra on layered statesO((n+m) log n)
2022 DecemberStrongest Friendship GroupGreedy + sorted edge addition; offline DSUO(m log m + m α)
2022 FebruaryCounting GraphsCombinatorics + small case enumerationO(n)

💎 Platinum · stretch reading

Reach problems for after you've cleared Gold. Don't grind these as a Bronze/Silver student — read one and understand the editorial as exposure to advanced ideas.

Season · RoundProblemKey ideaNotable structure
2024 DecemberCake GameHeavy-light + segment tree on Euler tourHLD
2024 JanuaryMooball MadnessTreap + small-to-large mergingPersistent / treap
2023 DecemberTree TourCentroid decomposition + offline queriesCentroid
2023 FebruaryWatching CowflixConvex hull trick on tree DPCHT + tree DP
2022 DecemberLetter BagFFT / NTT on generating functionsFFT

How a "problem study session" should look

  1. Read the official statement twice. The second pass, write down the input/output format and constraints in your own words.
  2. Identify the constraint bracket. n ≤ 20? n ≤ 10⁵? That alone narrows the algorithm family.
  3. Brainstorm 1–2 ideas on paper. Don't open an editor yet.
  4. Code your best idea. Test on samples, then on a hand-crafted edge case.
  5. If WA/TLE, debug with prints or a brute checker. Don't randomly tweak.
  6. Once accepted (or after ~60 min stuck), read the editorial. Note what they did differently.
  7. Re-implement the editorial's approach without looking. That's where the learning sticks.