2013年11月16日

Area of Simple Polygons

摘要: poj1389:http://poj.org/problem?id=1389题意:求矩形面积的并题解:扫描线加线段树 同poj1389 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=2002; 7 int num; 8 struct Node{ 9 int l;10 int r;11 int tp;12 int y;13 bool operator =r)update(l,r,f,idx1){57 mid=(... 阅读全文

posted @ 2013-11-16 17:07 天依蓝 阅读(132) 评论(0) 推荐(0) 编辑

Atlantis

摘要: poj1151:http://poj.org/problem?id=1151题意:求矩形面积的并题解:扫描线加线段树 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=202;//注意这里的初始化,不能开小了,是200条边 7 int num;//记录x坐标的个数 8 struct Node{ 9 double l;//边的左端点 10 double r;//边的又端点 11 int tp;//是出度边还是入度边 12 double y;/... 阅读全文

posted @ 2013-11-16 17:03 天依蓝 阅读(168) 评论(0) 推荐(0) 编辑

导航