Problem 850 · Hard
Cut the plane into vertical slabs at every rectangle edge and merge y-intervals inside each slab.
Open the interactive visualisation