Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The heights of the rectangles and the y-coordinates of the points are only at most 100, so for each point, we can iterate over the possible heights of the rectangles that contain a given point.
For a given point and height, can we efficiently count how many rectangles with that height contain our point?
Sort the rectangles at each height and use binary search.