随笔分类 -  *计算几何---凸包

摘要:CRB and Farm HDU - 5408 题意:给一个n个点的大凸包,再给k个内部点,问能否选择不超过2k个大凸包上的点使得所选点围成的凸包完全包含内部的k个点. 首先明确一定是存在的 可以先对内部的k个点求一个凸包,然后选一个凸包内的点A,求A与凸包上的各点形成的射线与大凸包的交点.则交点所 阅读全文
posted @ 2017-10-16 16:50 yijiull 阅读(191) 评论(0) 推荐(0)
摘要:Airport UVA - 11168 题意: 给n个点,让求一条直线使得所有点都在它的同侧,并且距离最小。 直线一定是凸包上的某一条边~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 10010; 4 co 阅读全文
posted @ 2017-09-26 22:36 yijiull 阅读(146) 评论(0) 推荐(0)
摘要:Area of Mushroom HDU - 4946 题意: 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <algorithm> 5 #include <cmath> 6 using names 阅读全文
posted @ 2017-08-17 12:29 yijiull 阅读(109) 评论(0) 推荐(0)
摘要:Grandpa's Estate POJ - 1228 题意:给一些点,问能否唯一确定一个凸包。 先求凸包,当且仅当每条边都至少三个点时可唯一确定一个凸包。 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #inclu 阅读全文
posted @ 2017-08-16 23:18 yijiull 阅读(158) 评论(0) 推荐(0)
摘要:Wall POJ - 1113 题意:将宫殿围起来,要求城墙离宫殿距离不小于L且花费最小。 Andrew求凸包,转角处合起来刚好是个半径为L的圆。 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <a 阅读全文
posted @ 2017-08-16 21:20 yijiull 阅读(215) 评论(0) 推荐(0)
摘要:The Fortified Forest POJ - 1873 题意:n棵树,砍掉一些树做木材将剩余的树围起来。 n较小,二进制枚举~ 1 #include <cstdio> 2 #include <iostream> 3 #include <cstring> 4 #include <cmath> 阅读全文
posted @ 2017-08-16 21:16 yijiull 阅读(218) 评论(0) 推荐(0)
摘要:Wall POJ - 1113 题意:将宫殿围起来,要求城墙离宫殿距离不小于L且花费最小。 题解:here The Fortified Forest POJ - 1873 题意:n棵树,砍掉一些树做木材将剩余的树围起来。 题解:here Grandpa's Estate POJ - 1228 题意: 阅读全文
posted @ 2017-08-16 16:55 yijiull 阅读(155) 评论(0) 推荐(0)