http://poj.org/problem?id=3348
第一个凸包,代码参考网上凸包的做法,先记录下来,慢慢学习
Cows
Time Limit:2000MS |
|
Memory Limit:65536K |
|
|
|
Description
Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence posts by using trees as fence posts wherever possible. Given the locations of some trees, you are to help farmers try to create the largest pasture that is possible. Not all the trees will need to be used.
However, because you will oversee the construction of the pasture yourself, all the farmers want to know is how many cows they can put in the pasture. It is well known that a cow needs at least 50 square metres of pasture to survive.
Input
The first line of input contains a single integer,n(1 ≤n≤ 10000), containing the number of trees that grow on the available land. The nextnlines contain the integer coordinates of each tree given as two integersxandyseparated by one space (where -1000 ≤ x, y ≤ 1000). The integer coordinates correlate exactly to distance in metres (e.g., the distance between coordinate (10; 11) and (11; 11) is one metre).
Output
You are to output a single integer value, the number of cows that can survive on the largest field you can construct using the available trees.
Sample Input
4
0 0
0 101
75 0
75 101
Sample Output
151
参考:http://hi.baidu.com/fandywang_jlu/blog/item/aa4abd18e49762b74bedbc21.html
分享到:
相关推荐
北大POJ1113-Wall【凸包】 解题报告+AC代码
O(nlogn)凸包问题 poj2187
poj 2430 Lazy Cows.md
POJ上做的一个凸包的题,可作为凸包的模板。
POJ2186-Popular Cows 【Tarjan+极大强连通分量+缩点】 解题报告+AC代码 http://hi.csdn.net/!s/BGDH68 附:我所有的POJ解题报告链接 . http://blog.csdn.net/lyy289065406/article/details/6642573
北大poj1012-Joseph【经典约瑟夫问题】 poj1012-Joseph【经典约瑟夫问题】
POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类POJ分类
poj习题第一题,很有意思,是学习poj的开始
西北工业大学POJ作业第一季习题,可以让广大的大一学子能够在C语言更加轻松更加便捷。
放炮问题,北大网站 POJ 1185 算法
NULL 博文链接:https://128kj.iteye.com/blog/1748635
poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题报告poj 解题...
POJ1321棋盘问题 很好两种解法很值得去参考一下 完整的实验报告还有代码希望kan
NULL 博文链接:https://128kj.iteye.com/blog/1749213
POJ1048,加强版的约瑟夫问题 难度中等
北大POJ2002-Squares 解题报告+AC代码
poj1113 melkman算法求凸包, 使用STL
凸包melkman算法cpp实现,通过poj1113题测试
POJ第1861题源码 POJ第1861题源码 POJ第1861题源码