# 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:** $\mathcal{O}(\text{max coordinate})$

Solution

### Fast Solution

**Time Complexity:** $\mathcal{O}(1)$

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:** $\mathcal{O}((\text{max coordinate})^2)$

Solution

### Fast Solution

**Time Complexity:** $\mathcal{O}(1)$

Solution

## Problems

Status | Source | Problem Name | Difficulty | Tags | |||||
---|---|---|---|---|---|---|---|---|---|

Bronze | Very Easy | ## Show TagsRectangle | |||||||

Bronze | Easy | ## Show TagsRectangle | |||||||

CF | Normal | ## Show TagsRectangle | |||||||

### 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!