Spiral Area Division
Time limit1sMemory limit64 MB
Given up to 100 points in an 80 by 80 square cut into 15 labeled pieces by alternating 3-to-1 splits, output the label containing each point.
- Level
Easy3 of 10
- Topics
- Geometry, Simulation, Implementation
- Solved
- No attempts yet
Problem
An 80 by 80 square is repeatedly split into 3:1 area pieces by alternating vertical and horizontal cuts. The small piece receives labels 1 through 15. For each point not on a cut line, report its label.
Input
The first line contains points (). Each of the next lines contains and with .
Output
Print the region label for each point on its own line.