P17213 [ICPC 2017 Nanning R] The Ball

Description

:::align{center} ![](https://cdn.luogu.com.cn/upload/image_hosting/61sn1o50.png) ::: In the three dimensional Euclidean space $(X, Y, Z)$, the intersection of several half spaces and $\{X \le 0, Y \le 0, Z \le 0\}$ forms an area with positive volume. Here each half space is represented as a linear inequation $AX + BY + CZ \le D$. 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 $T (1 \le T \le 160)$ indicating the number of cases. For each case, the first line contains an integer $N (1 \le N \le 100)$ indicating the number of half spaces. Each of the following lines describes a half space given by four integers $A,B,C$ and $D$ corresponding to the linear inequation $AX+BY +CZ \le D$,where $-100 \le A,B,C,D \le 100$. The summation of N in input is up to $6200$.

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 $4$ digits after the decimal point.