USACO Guide
Range Queries
More Applications of Segment TreeRange Queries with Sweep LineRange Update Range QuerySparse Segment Trees2D Range QueriesDivide & Conquer - SRQSquare Root Decomposition
Trees
Binary JumpingSmall-To-Large MergingHeavy-Light DecompositionCentroid Decomposition
Geometry
Geometry PrimitivesSweep LineConvex HullConvex Hull Trick
Misc. Topics
Inclusion-Exclusion PrincipleMatrix Exponentiation(Optional) BitsetsDivide & Conquer - DP
Conclusion
Additional Practice for USACO Platinum
Settings

USACO Gold 2018 December - Cowpatibility

Author: Ryan Chou

Edit This Page

Appears In

  • Gold - Combinatorics
  • Platinum - (Optional) Bitsets
  • Platinum - Inclusion-Exclusion Principle
View Problem Statement

Official Analysis (C++)

Hint

Solution

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!

Join Forum