![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm_计算几何
文章平均质量分 76
ascii991
这个作者很懒,什么都没留下…
展开
-
poj 1696 极角排序
【题意】 求一个只向左转的路径,使得经过最多的点,但每个点不能重复走。 【题解】 水题,叉积应用,极角排序。 【代码】 #include #include #include using namespace std; const int maxn=55; struct point { int x,y,id; }p[maxn],b[maxn],ans[maxn]; bo原创 2012-04-25 10:09:34 · 477 阅读 · 0 评论 -
poj 2187 求凸包最远点对--旋转卡壳
【题意】 求最远点对 【题解】 凸包+旋转卡壳 没学过旋转卡壳的,提供一个链接http://www.cnblogs.com/DreamUp/archive/2010/09/16/1828131.html 【代码】 #include #include #include using namespace std; const int maxn=100003; struct poi原创 2012-05-03 09:01:49 · 773 阅读 · 0 评论 -
poj 1474 半平面交求多边形的核
【题意】 是否能在房间中找到一个位置来安装摄像头,使摄像头能监控到房间的每个角落。在平面图上,房间的墙只有横和竖的,没有斜的。 【题解】 判断多边形是否存在核。用半平面交判断。 【代码】 #include #include #define eps 1e-8 #define oo 1e5 using namespace std; const int maxn=105; struc原创 2012-05-03 13:55:09 · 1342 阅读 · 0 评论 -
poj 3525 求凸多边形的最大内切圆
【题意】 凸多边形的最大内切圆 【题解】 二分+半平面交判定。 【代码】 #include #include #define eps 1e-8 #define oo 1e5 using namespace std; const int maxn=105; struct point { double x,y; point() {} poi原创 2012-05-04 10:28:07 · 4853 阅读 · 1 评论 -
topcoder SRM500 DIV1 level2 500分
Problem Statement Nick likes to draw fractals. For the special occasion of Single Round Match 500, he decided to draw the 500th generation of his favorite fractal. Each generation of the原创 2012-05-14 16:47:23 · 684 阅读 · 0 评论 -
poj1156
一道图论和计算几何综合的题 题意很好理解,略 【解答】 把墙上的所有可以走的点作为图中的点,建边的时候用线段相交判断是否可以连边。 在跑一次dijkstra即可得解。注意,线段相交的时候,端点不算。 水题,可以作为练手的题。 #include #include #define eps 1e-8 using namespace std; const int maxn=300; c原创 2012-04-11 11:45:48 · 619 阅读 · 1 评论 -
poj2318
【题意】 有一个大箱子,由n个板分为n+1块,标号为0~n已知盒子左上角和右下角的坐标及每个板上下两端的横坐标(板不会交错,且按顺序给出)然后给出玩具的坐标,统计每块空间内玩具个数(保证玩具一定落在空间内) 【解答】 其实就是二分,用叉积的性质。 表示偷懒了,二分一直写不清楚,干脆二分缩小到只剩5个后枚举。 水。。 #include using namespa原创 2012-04-11 09:42:11 · 1605 阅读 · 0 评论