joj 2433: Circle Railway


Result
TIME Limit
MEMORY Limit
Run Times
AC Times
JUDGE
3s
8192K
454
131
Standard
There are some villages in the ACM Mainland. The king want to build a circle railway to make the traffic more easy. What is the best radius if the center of the circle railway is fixed? In the ACM Mainland, all the residenter can fly into the train without station. So you should calculate the summary from the villages directed to the circle railway.

Input


The first line of each case is the number of villages n (n <=100) , n is zero means the end of input. The next n lines includes two double coordinates. The coordinates of the center is shown after villages data.

Output


Output the best summary in one line. The result is displayed to a precision of 3 digit after the decimal point.

Sample Input

2
1.0 1.0
2.0 2.0
0.0 0.0
0

Sample Output

1.414

/*
最も簡単な暴力はすべての点を列挙して、すべての点から円心までの距離を求めて、それを同じ直線の上で討論して、すべてのbest summaryの中できっと1種の情況があることを証明するのは難しくなくて、さもなくばきっともっと小さいbest summaryが存在して、だからすべての点を列挙して、最小の距離を探し出して、ここに小さい技巧があって、総距離は1つの単調な減区間と1つの増区間だけで、すなわち、記録されたanswerがtmpより小さいことが判明した場合に検索を停止することができ、式tmp=tmp+(2*i-n)*(d[i]-d[i-1]);*/
#include #include #include #include #define sqr(a) ((a)*(a))#define dis2(a,b) sqrt(sqr(a.x-b.x)+sqr(a.y-b.y))using namespace std;const int pi=acos(-1.0);struct point{    double x,y;}p[105],cir;double r;
int main (){    int n;    while (scanf("%d",&n) && n)    {        double d[105],sum=0.0,ans=0.0,tmp=0.0;        for (int i=0 ; i*/