![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
计算几何
文章平均质量分 65
BraketBN
这个作者很懒,什么都没留下…
展开
-
【Codeforces659D】Bicycle Race【向量叉积】
【题目链接】题意:给出一个n边形,并且从左下角开始顺时针给出点坐标,求凹进去的地方的个数。向量叉积算出方向,统计一下就完了。/* Footprints In The Blood Soaked Snow */#include #include #include using namespace std;typedef long long LL;typedef pai原创 2016-03-31 23:03:43 · 474 阅读 · 0 评论 -
【POJ2187】Beauty Contest【旋转卡壳】
【题目链接】学习一发旋转卡壳。/* Telekinetic Forest Guard */#include #include #include using namespace std;const int maxn = 50005;int n, m;struct Vector { int x, y; Vector(int a = 0, int b = 0)原创 2016-05-26 15:16:22 · 400 阅读 · 0 评论 -
【BZOJ1007】[HNOI2008]水平可见直线【半平面交】
【题目链接】学习一发计算几何基础。/* Telekinetic Forest Guard */#include #include #include #include using namespace std;typedef double DB;const int maxn = 50005;const DB eps = 1e-6;struct _line { D原创 2016-05-18 15:32:44 · 351 阅读 · 0 评论 -
【BZOJ3348】Cows【凸包】【凸包面积】
【题目链接】题意:求凸包,求面积,然后给面积除以50,向下取整。用的Andrew算法,即跑两次,先求出下凸包,然后再求出上凸包。求面积时候应该用凸包数组求,结果写成了原来的点的数组,调了20多分钟。弱智+2/* Telekinetic Forest Guard */#include #include #include #include using namespa原创 2016-05-20 07:39:54 · 543 阅读 · 0 评论 -
【BZOJ1069】[SCOI2007]最大土地面积【凸包】
【题目链接】显然四个点都在凸包上,按逆时针设为i, a, j, b,枚举i和j,a和b都是单调的,复杂度为O(n^2)闲得无聊写了个暴力。。/* Forgive me Not */#include #include #include using namespace std;typedef long double LD;typedef double DB;原创 2016-06-12 22:39:18 · 600 阅读 · 0 评论