#P46. Machining Disc Rotors
Machining Disc Rotors
题目描述
Edward is a worker for Aluminum Cyclic Machinery. His work is to control the mechanical arms to cut out some parts of the mould material. Here is a brief introduction to his work.
Suppose the operation panel for him is a Euclidean plane with the coordinate system. Originally the mould is a disc whose centre coordinates is and of radius . Edward controls different mechanical arms to cut out and erase those all of the mould within their affected areas. The affected area of the -th mechanical arm is a circle whose centre coordinate is and of radius . In order to obtain the highly developed product, it is guaranteed that the affected areas of any two mechanical arms share no intersection and no one has an affected area containing the whole original mould.
Your task is to determine the diameter of the residual mould. Here the diameter of a subset, which may not be convex, over the Euclidean plane is the supremum (i. e. the least upper bound) of distances between every two points in the subset. Here is an illustration of the sample.

输入格式
The input contains several test cases, and the first line contains a positive integer indicating the number of test cases which is up to .
For each test case, the first line contains two integers and , where and .
The following lines describe all mechanical arms controlled by Edward, the -th of which contains three integers and describing the affected area of the -th mechanical arm, where and .
输出格式
For each test case, output a line containing "Case #x: y" (without quotes), where is the test case number starting from , and is the diameter of the remaining area with an absolute or relative error of at most . Precisely speaking, assume that your answer is and and the jury's answer is , your answer will be considered correct if $\frac{\left|a-b\right|}{\max\{1,\left|b\right|\}}\le10^{-9}$, where means the maximum of and and means the absolute value of .
1
3 10
0 12 10
11 -6 10
-11 -6 10
Case #1: 18.611654895000252
题目大意
现在一个以原点为圆心,半径为 的大圆,和 个以 为圆心,半径为 的互相的交也互不包含的小圆,问大圆去掉与小圆相交的部分,那剩下的大圆最大直径为多少,其中小圆不会包含大圆。