RUNAWAY - Run Away

题意翻译

在给定范围内找一个点,使得距离所有点的最小值最大。 ## 输入格式 第一行,输入一个数 $T$,表示共有 $T$ 组数据。 对于每组数据,以用空格分开的三个数 $X,Y,M$ 开始,满足 $1\le X,Y \le 10000,1 \le M \le 1000$,其中 $X,Y$ 是给定的范围,$M$ 是点的数量。 其下 $M$ 行,每行输入两个数 $U_i,V_i$,保证 $0\le U_i \le X,0\le V_i\le Y$ 表示第 $i$ 个点在 $(U_i,V_i)$ 。 **同一位置可能有多个点** ## 输出格式 对于每一组数据,输出一行 `The safest point is (P, Q).` 其中 $P,Q$ 是所求得的点的坐标,两坐标精确至小数点后一位。 Translated by @我是lyy @Error_502

题目描述

One of the traps we will encounter in the Pyramid is located in the Large Room. A lot of small holes are drilled into the floor. They look completely harmless at the first sight. But when activated, they start to throw out very hot java, uh ... pardon, lava. Unfortunately, all known paths to the Center Room (where the Sarcophagus is) contain a trigger that activates the trap. The ACM were not able to avoid that. But they have carefully monitored the positions of all the holes. So it is important to find the place in the Large Room that has the maximal distance from all the holes. This place is the safest in the entire room and the archaeologist has to hide there.

输入输出格式

输入格式


The input consists of T test cases. The number of them (T) is given on the first line of the input file. Each test case begins with a line containing three integers X, Y, M separated by space. The numbers satisfy conditions: 1 <= X,Y <=10000, 1 <= M <= 1000. The numbers X and Yindicate the dimensions of the Large Room which has a rectangular shape. The number M stands for the number of holes. Then exactly M lines follow, each containing two integer numbers U $ _{i} $ and V $ _{i} $ (0 <= U $ _{i} $ <= X, 0 <= V $ _{i} $ <= Y) indicating the coordinates of one hole. There may be several holes at the same position.

输出格式


Print exactly one line for each test case. The line should contain the sentence "`The safest point is (P, Q).`" where P and Qare the coordinates of the point in the room that has the maximum distance from the nearest hole, rounded to the nearest number with exactly one digit after the decimal point (0.05 rounds up to 0.1).

输入输出样例

输入样例 #1

3
1000 50 1
10 10
100 100 4
10 10
10 90
90 10
90 90
3000 3000 4
1200 85
63 2500
2700 2650 
2990 100

输出样例 #1

The safest point is (1000.0, 50.0).
The safest point is (50.0, 50.0).
The safest point is (1433.0, 1669.8).