题目链接:https://vjudge.net/problem/POJ-1113 题意:简化下题意即求凸包的周长+2×PI×r。 思路:用graham求凸包,模板是kuangbin的。 AC code: #include<cstdio> #include<cstring> #include<algo ...
分类:
其他好文 时间:
2019-11-09 14:07:10
阅读次数:
88
题意: 求把城堡围起来需要的最小墙壁周长。 思路: 围墙周长为=n条平行于凸包的线段+n条圆弧的长度=凸包周长+围墙离城堡距离L为半径的圆周长。 代码: 。。。还是看大佬写的,自己做个记录方便日后复习。。 ...
分类:
其他好文 时间:
2017-10-31 20:16:28
阅读次数:
163
Wall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24604 Accepted: 8183 Description King想在自己的n个城堡外建Wall,使Wall与任一城堡距离至少为L且能围住它的城堡. 求Wall最短 ...
分类:
其他好文 时间:
2017-07-21 23:17:05
阅读次数:
225
Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, ...
分类:
其他好文 时间:
2016-12-31 21:55:04
阅读次数:
298
题目大意:建立围墙将城堡围起来,要求围墙至少距离城堡L,拐角处用圆弧取代,求围墙的长度。 题目思路:围墙长度=凸包周长+(2*PI*L),另外不知道为什么C++poj会RE,G++就没问题。 #include<cstdio> #include<cstdlib> #include<cmath> #in ...
分类:
其他好文 时间:
2016-11-04 16:55:49
阅读次数:
208
题目大意: 给出平面上若干个点的坐标,你的任务是建一个环形围墙,把所有的点围在里面,且距所有点的距离不小于l。求围墙的最小长度。 很容易得出答案就是凸包周长+以l为半径的圆的周长。 这里讲一下Andrew算法。 Andrew是Graham算法的变种,而且Andrew更快,更稳定。 Andrew算法思 ...
分类:
其他好文 时间:
2016-07-02 11:49:40
阅读次数:
224
http://poj.org/problem?id=1113 题目大意:现在要给n个点,让你修一个围墙把这些点围起来,距离最小是l 分析 :现在就是求凸包的周长然后再加上一个圆的周长 ...
分类:
编程语言 时间:
2016-05-17 09:53:03
阅读次数:
271
【题目】 Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so gr ...
分类:
其他好文 时间:
2016-04-28 20:13:06
阅读次数:
285
DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so greedy, that he would not listen to his Architect’s proposa...
分类:
其他好文 时间:
2015-08-07 22:27:06
阅读次数:
160
poj1113-Wall
Wall
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 31394
Accepted: 10610
Description
Once upon a time there was a greedy King w...
分类:
其他好文 时间:
2015-05-25 10:07:39
阅读次数:
147