#P4586. [FJOI2015] 最小覆盖双圆问题

[FJOI2015] 最小覆盖双圆问题

Description

Given nn points on the plane (x1,y1),,(xn,yn)(x_1, y_1), \ldots, (x_n, y_n), find two circles R1R_1 and R2R_2 with the same radius that cover all the given nn points, and the radius is as small as possible.

Design an algorithm to compute the minimal radius of the two covering circles R1R_1 and R2R_2.

Input Format

The input contains multiple test cases.
For each case, the first line contains a positive integer nn (n<1000n < 1000), indicating there are nn points on the plane.
Each of the next nn lines contains two real numbers xx and yy, with 100000x100000-100000 \le x \le 100000 and 100000y100000-100000 \le y \le 100000.
The input ends with a line containing a single 00.

Output Format

For each test case, output the minimal radius of a circle that satisfies the requirement, keeping two decimal places.

3 
0.00 0.00 
1.00 0.00 
0.00 4.00 
10 
0.00 0.00 
0.00 3.00 
1.00 6.00 
2.00 2.00 
3.00 5.00 
5.00 3.00 
6.00 3.00 
9.00 5.00 
10.00 5.00 
11.00 3.00 
0
0.50
3.05

Hint

For 100% of the testdata, n1000n \le 1000, xi,yi100000|x_i|, |y_i| \le 100000, and T10T \le 10.

Translated by ChatGPT 5