计算几何
文章平均质量分 85
wJs9528-1
这个作者很懒,什么都没留下…
展开
-
POJ 1556 The Doors 计算几何+MST
Description You are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial and f原创 2015-08-09 16:47:23 · 406 阅读 · 0 评论 -
几种极角排序的cmp函数摘录
原文:http://blog.csdn.net/hysfwjr/article/details/8949810 double cross(const point &p1, const point &p2, const point &q1, const point &q2) { return (q2.y-q1.y)*(p2.x-p1.x)-(q2.x-q1.x)*(p2.y-p1.转载 2016-04-26 23:12:10 · 535 阅读 · 0 评论 -
CodeForces 670D Triangles
D. TrianglesLittle Petya likes to draw. He drew N red and M blue points on the plane in such a way that no three points lie on the same line. Now he wonders what is the number of distinct triangles wit原创 2016-08-17 18:14:56 · 602 阅读 · 0 评论 -
CodeForces 32E Hide-and-Seek(线段交,点关于直线对称点)
Hide-and-SeekDescriptionVictor and Peter are playing hide-and-seek. Peter has hidden, and Victor is to find him. In the room where they are playing, there is only one non-transparent wall and one doubl原创 2016-08-17 20:04:17 · 632 阅读 · 0 评论 -
HDU 1632 Polygons (凸包)
题意: 在平面内给出两个凸多边形,求出两个凸多边形不重合的面积凸多边形和凸多边形的图形交一定也是凸多边形,直接On2On^2求出图形交的凸多边形,再加加减减就能求出面积了 注意输入完所有数据后换行,题目上没有明确说明,莫名WA#include<cstring> #include<algorithm> #include<iostream> #include<cstdio> #include<cma原创 2016-08-24 08:57:11 · 711 阅读 · 0 评论 -
半平面交模板
网上搜刮来的模板题目: POJ 3335 Rotating Scoreboard POJ 1474 Video Surveillance POJ 1279 Art Gallery POJ 3525 Most Distant Point from the Sea POJ 3384 Feng Shui POJ 1755 Triathlon POJ 254原创 2016-08-25 10:25:27 · 373 阅读 · 0 评论 -
HDU 4946 Area of Mushroom (凸包)
题意:一个师傅有n个徒弟,每个徒弟在二维坐标系内有一个坐标和速度,问哪些徒弟能够到达的距离是无穷远,某个徒弟某个点能够到达时间必须严格小于其他徒弟首先最大速度的徒弟能够到达的面积肯定能够囊括其他所有徒弟的,那么首先把速度最大的所有徒弟全部取出来,此时发现取出的凸包就是解(凸包里面的点肯定被覆盖),注意一下凸包边界上的点,用int处理精度#include<cstring> #include<iostr原创 2016-08-26 08:52:56 · 286 阅读 · 0 评论