Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 1020 Accepted: 407 Description Yoko's math homework today was to calculate areas of polygons in the xy-plane. Vertices are all aligned to grid points (i.e. they have integer coordinates).…
这个题lba等神犇说可以不用离散化,但是我就是要用. 题干: Description There are N, <= N <= , rectangles -D xy-plane. The four sides of a rectangle are horizontal or vertical line segments. Rectangles are defined by their lower-left and upper-right corner points. Each corner p…
poj1389:http://poj.org/problem?id=1389 题意:求矩形面积的并题解:扫描线加线段树 同poj1389 #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; ; int num; struct Node{ int l; int r; int tp; int y; bool operator…