#Q67. 「一本通 3.1 例 2」北极通讯网络
「一本通 3.1 例 2」北极通讯网络
Description
Original source: Waterloo University 2002
In a certain region of the Arctic, there are villages, each represented by a pair of integer coordinates (). To enhance communication, it is decided to establish a communication network among the villages. The communication tools can be either radio transceivers or satellite devices. All villages can be equipped with a radio transceiver, and all transceivers are of the same model. However, the number of satellite devices is limited, so only a subset of villages can be equipped with them.
Different models of radio transceivers have a parameter . Two villages can communicate directly via radio if the distance between them does not exceed . The larger the value, the more expensive the transceiver model. Villages equipped with satellite devices can communicate directly regardless of the distance between them.
Given satellite devices, write a program to determine how to allocate these devices so that the required value for the radio transceivers is minimized, ensuring that every pair of villages can communicate directly or indirectly.
For example, consider the following three villages:

Here,
If there are no satellite devices or only satellite device ( or ), the smallest that satisfies the condition is . This is because and , and and can communicate directly via radio, while and can communicate indirectly through (i.e., messages are relayed from to and then from to ).
If there are satellite devices (), they can be allocated to and . The smallest can then be , as and can communicate directly via radio, and can communicate directly via satellite, and and can communicate indirectly through .
If there are satellite devices, , , and can all communicate directly via satellite, and the smallest can be .
Input Format
The first line contains two space-separated integers and ;
The next lines each contain two integers, where the -th line's represent the coordinates of the -th village ().
Output Format
A real number representing the smallest value, rounded to decimal places.
Sample 1
3 2
10 10
10 0
30 0
10.00
Data Range and Hints
For all data, .