First, change each rectangle into a segment, for it can make a 
continuous segment invisible. The problem is reduced to find the 
point which is covered by most segments. You can simply achieve it
by regarding the left and right ends of the segment as a insertion 
and deletion event. Then you make a scan of the whole line from 
left to right and see which is the maximal value of the number of 
segments that is currently in the scanning.