1. 程式人生 > >POJ1151 (HDU 1542) Atlantis【矩形面積並,線段樹+離散化+掃描線模板】

POJ1151 (HDU 1542) Atlantis【矩形面積並,線段樹+離散化+掃描線模板】

The input consists of several test cases. Each test case starts with a line containing a single integer n (1 <= n <= 100) of available maps. The n following lines describe one map each. Each of these lines contains four numbers x1;y1;x2;y2 (0 <= x1 < x2 <= 100000;0 <= y1 < y2 <= 100000), not necessarily integers. The values (x1; y1) and (x2;y2) are the coordinates of the top-left resp. bottom-right corner of the mapped area.
The input file is terminated by a line containing a single 0. Don't process it.