Not Frequent
0/5
Rectangle Geometry
Authors: Darren Yao, Michael Cao, Benjamin Qi, Allen Li, Andrew Wang, Dong Liu
Prerequisites
Problems involving rectangles whose sides are parallel to the coordinate axes.
Resources | |||
---|---|---|---|
IUSACO | module is based off this |
Most problems in this category include only two or three squares or rectangles, in which case you can simply draw out cases on paper. This should logically lead to a solution.
Example - Fence Painting
Focus Problem – read through this problem before continuing!
Slow Solution
Time Complexity:
Solution
Fast Solution
Time Complexity:
Solution
Example - Blocked Billboard
Think of this as the 2D analog of the previous example.
Focus Problem – read through this problem before continuing!
Slow Solution
Time Complexity:
Solution
Fast Solution
Time Complexity:
Solution
Problems
Module Progress:
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!