第七题 Picture
http://acm.pku.edu.cn/JudgeOnline/problem?id=1177
【题目描述】给出n个矩阵,求最后覆盖区域的周长。

【输入格式】0 <=N < 5000 ,下n行,每行 x1,y1,x2,y2(分别是矩阵左下角和右上角的坐标)All coordinates are in the range [-10000,10000] and any existing rectangle has a positive area.
【输出格式】覆盖区域的周长。
Sample Input
7
-15 0 5 10
-5 8 20 25
15 -4 24 14
0 -6 16 4
2 15 10 22
30 10 36 20
34 0 40 16
Sample Output
228
Source
IOI 1998