Wall--POJ1113(极角排序+求凸包)】的更多相关文章

http://poj.org/problem?id=1113 题目大意:现在要给n个点,让你修一个围墙把这些点围起来,距离最小是l 分析  :现在就是求凸包的周长然后再加上一个圆的周长 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<algorithm> #include<iostream> #include<qu…
Wall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28462   Accepted: 9498 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, that he wo…
在古老的迈瑞城,巍然屹立着 n 块神石.长老们商议,选取 3 块神石围成一个神坛.因为神坛的能量强度与它的面积成反比,因此神坛的面积越小越好.特殊地,如果有两块神石坐标相同,或者三块神石共线,神坛的面积为 0.000. 长老们发现这个问题没有那么简单,于是委托你编程解决这个难题. 输入格式: 输入在第一行给出一个正整数 n(3 ≤n≤5000).随后 n 行,每行有两个整数,分别表示神石的横坐标.纵坐标(-109≤横坐标.纵坐标<109). 输出格式: 在一行中输出神坛的最小面积,四舍五入保留…
Wall Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2848    Accepted Submission(s): 811 Problem Description Once upon a time there was a greedy King who ordered his chief Architect to build a w…
题目大意:给N个点,然后要修建一个围墙把所有的点都包裹起来,但是要求围墙距离所有的点的最小距离是L,求出来围墙的长度. 分析:如果没有最小距离这个条件那么很容易看出来是一个凸包,然后在加上一个最小距离L,那么就是在凸包外延伸长度为L,如下图,很明显可以看出来多出来的长度就是半径为L的圆的周长,所以总长度就是凸包的周长+半径为L的圆的周长. 代码如下: -------------------------------------------------------------------------…
Space Ant Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4970   Accepted: 3100 Description The most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y19…
做法很显然,求出所有的锐角和钝角就能求出有多少个锐角三角形了. 我用了愚钝的方法,写了两三个小时... 看了下别人简单的代码.学习了下做法. sort(temp+,temp+cnt+);//排序 For(j,,cnt)//这一步,复制了一遍所有角,然后就能很好的处理在逆时针的情况 { temp[j+cnt]=temp[j]+*PI; } ,r=,le=; For(j,,cnt) { *cnt)r++;//找出<180的角 *cnt)l++;//找出<90度的角 *cnt)le++;//排除一条…
题目传送门 题意:裸的对原点的极角排序,凸包貌似不行. /************************************************ * Author :Running_Time * Created Time :2015/11/3 星期二 14:46:47 * File Name :POJ_2007.cpp ************************************************/ #include <cstdio> #include <al…
Beauty Contest Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 26180   Accepted: 8081 Description Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bess…
Wall Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 31199   Accepted: 10521 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, that he w…