F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Network

Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 934    Accepted Submission(s): 274


Problem Description
With the help of the Ares L, the Emperor of Law and some stars of the future, General M succeeded in setting foot on the mountain, and had set up a kingdom, known as ACMSYSU. In order to reward these founding heroes, General M decided to share her network.
General M has manufactured a router. One can use this network if the Euclidean distance between his/her house and the router is not greater than d. Because of General M's excellent technology, the distance between her house and the router can be infinite.
There are n heroes in the kingdom besides General M. General M is not an eccentric person, so she hopes everyone can use the network. Because the farther the router is away from her house, the worse the signal, General M wants the router being as close to her house as possible. Please help General M place the router so that the distance between her house and the router is minimized, and every one can use the router. You just need to tell General M the minimum distance.
 

Input
The input will consist of multiple test cases.
For each case, the first line contains 3 integers x, y and d, which represent that the General M's house locates at the point (x, y) and one can use the network if his/her distance to the router is not greater than d.
The second line is a positive integer n, the number of heroes of the kingdom.
Then n lines follow. Each line has 2 integers x_i and y_i, indicating that the i-th hero locates at point (x_i, y_i)ĄŁ

All integers in the input satisfy that their absolute values are less than or equal to 10^5, and 1<=n<=10^3.
 

Output
For each case, output a real number which indicates the minimum distance between the General M's house and the router, to two decimal places.
If it is impossible to share a network which can cover everyone, output an 'X' (without the single quote).
 

Sample Input
0 0 5 2 5 3 5 -3 0 0 1 2 5 3 5 -3
 

Sample Output
1.00 X
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 06:06:12, Gzip enabled