摘自http://blog.csdn.net/accry/article/details/6070621 首先解决问题:什么是半平面? 顾名思义,半平面就是指平面的一半,我们知道,一条直线可以将平面分为两个部分,那么这两个部分就叫做两个半平面. 然后,半平面怎么表示呢? 二维坐标系下,直线可以表示为ax + by + c = 0,那么两个半平面则可以表示为ax + by + c >= 0 和ax + by + c < 0,这就是半平面的表示方法. 还有,半平面的交是神马玩意? 其实就是一个方程…
地址:http://poj.org/problem?id=1279 题目: Art Gallery Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7329 Accepted: 2938 Description The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the f…
Harry Potter and J.K.Rowling http://acm.hdu.edu.cn/showproblem.php?pid=3982 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1094 Accepted Submission(s): 357 Problem Description In July 31st,…
题意:求n个凸多边形的交面积. 半平面交模板题. #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; +,inf=0x3f3f3f3f; ),eps=1e-; struct P { db x,y; P operator-(P b) {return {x-b.x,y-b.y};} P operator+(P b) {return {x+b.x,y+b.y};} P operat…
Art Gallery Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 6668 Accepted: 2725 Description The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the form of polygons (not necessarily conve…
Most Distant Point from the Sea [题目链接]Most Distant Point from the Sea [题目类型]半平面交 &题解: 蓝书279 二分答案,判断平移后的直线的半平面交是否为空. 模板是照着敲的,还有一些地方不是很懂, 应该还要慢慢体会吧 &代码: #include <cstdio> #include <cmath> #include <algorithm> #include <vector>…
Most Distant Point from the Sea Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 3476 Accepted: 1596 Special Judge Description The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural t…