tiles[i] = [x, y, l] has its bottom-left corner at (x, y) and side length l. Tiles may overlap; any spot covered by several tiles counts **once**.
Find the smallest y coordinate of a horizontal line such that the covered area above the line equals the covered area below it.
Answers within 10⁻⁵ of the exact value are accepted.tiles=[[0, 0, 2], [1, 1, 2]] → 1.5
The squares overlap in a 1 × 1 cell, so the covered area is 4 + 4 − 1 = 7 and half of it is 3.5. Below y = 1 a strip of width 2 is covered (area 2); above it the strip is 3 wide. The missing 1.5 takes another 0.5 of height: the answer is 1.5.
tiles=[[0, 0, 1], [0, 3, 1]] → 1.0
The area is 2 and 1 must lie below the line. Any line from y = 1 to y = 3 splits it evenly; the lowest is y = 1.
tiles=[[4, 4, 2]] → 5.0
tiles[i] is a triple of integers [x, y, l]tiles=[[0, 0, 2], [1, 1, 2]]
1.5
Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.