#P14110. [ZJCPC 2017] Final Defense Line
[ZJCPC 2017] Final Defense Line
题目描述
There is a circle in the plane. Both the coordinates of the center and the radius are unknown.
Chiaki found three distinct points , and in the plane. And she also knows the shortest distance from each point to the circumference.
Chiaki would like to find the smallest circle according to above information.
Note that in general, a circle with infinite radius is a line. But in this problem, line is not considered as a circle.
输入格式
There are multiple test cases. The first line of input contains an integer (), indicating the number of test cases. For each test case:
The first line contains three integers , and () denoting the coordinates of and the shortest distance to the circumference.
The second line contains three integers , and () denoting the coordinates of and the shortest distance to the circumference.
The third line contains three integers , and () denoting the coordinates of and the shortest distance to the circumference.
If the distance is equal to , the point is on the circumference. If distance is greater than , the point is inside the circle. If distance is less than , the point is outside the circle and the shortest distance is the absolute value.
It is guaranteed that the minimum possible radius of the circle is at most .
输出格式
For each test case, if there are infinite possible circles, output in a single line. If there is no such circle, output in a single line. Otherwise, output an integer and a real number in a single line separated by one space denoting the number of possible circles and the radius of the smallest circle. You answer will be accepted if the relative error of your answer is no more than .
2
0 0 1
3 0 2
10 2 2
0 0 1
3 0 2
10 2 -2
2 10.327329213469
2 5.341730785440
提示
The image below shows the sample.
:::align{center}
:::