2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 F. Overlapping Rectangles (面积并+线段树)
There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with each other, and the overlapped areas of these rectangles shall not be counted more than once. For ex