KRAVE
Time limit5sMemory limit256 MB
You extend a horizontal or vertical fence from each given point across its current field and report the two resulting areas in order.
- Level
Medium6 of 10
- Topics
- Intervals, Binary search, Simulation
- Solved
- No attempts yet
Problem
A meadow is an rectangle. From point , build a horizontal or vertical fence until it hits another fence. After each fence, print the areas of the two new fields, smaller first.
Input
, , , then lines with , , ( horizontal, vertical).
Output
lines, two 64-bit integers per line.