← Questions
Lowest horizontal line that splits squares into equal areas
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Several axis-aligned squares are given by their bottom-left corner and side length. Find the lowest horizontal line y = h such that the total square area below the line equals the total area above it (squares may overlap; count overlapping area once per square). Use binary search on h or a sweep over the square edges, and handle precision.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding

