Welcome to ZOJ
Select Problem
ZOJ Problem Set - 1450
Minimal Circle

Time Limit: 5 Seconds      Memory Limit: 32768 KB

You are to write a program to find a circle which covers a set of points and has the minimal area. There will be no more than 100 points in one problem.


The input contains several problems. The first line of each problem is a line containing only one integer N which indicates the number of points to be covered. The next N lines contain N points. Each point is represented by x and y coordinates separated by a space. After the last problem, there will be a line contains only a zero.


For each input problem, you should give a one-line answer which contains three numbers separated by spaces. The first two numbers indicate the x and y coordinates of the result circle, and the third number is the radius of the circle. (use escape sequence %.2f)

Sample Input

0.0 0.0
3 0
0 0
0 1
1 0
1 1
2 2

Sample Output

1.50 0.00 1.50
1.00 1.00 1.41

Source: Asia 1997, Shanghai (Mainland China)
Submit    Status