#P17213. [ICPC 2017 Nanning R] The Ball
[ICPC 2017 Nanning R] The Ball
Problem Description
:::align{center}
:::
In the three dimensional Euclidean space , the intersection of several half spaces and forms an area with positive volume.
Here each half space is represented as a linear inequation . Our problem is to find the largest available ball fully locating in the area.
Input Format
The input contains several test cases. The first line of input contains an integer indicating the number of cases.
For each case, the first line contains an integer indicating the number of half spaces. Each of the following lines describes a half space given by four integers and corresponding to the linear inequation ,where . The summation of N in input is up to .
Output Format
For each test case, output a line. If the size of available balls is unrestricted, output “Infinity”. Else, output the largest radius of an available ball with the precision of digits after the decimal point.
5
3
1 0 0 1
0 1 0 1
0 0 1 1
1
1 1 1 1
2
-1 -1 -1 -2
1 2 3 7
2
1 0 0 1
0 0 1 1
1
1 -1 0 0
0.5000
0.2113
0.5901
0.5000
Infinity