Problem A
Arctic Network

The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every outpost will have a radio transceiver and some outposts will in addition have a satellite channel.
Any two outposts with a satellite channel can communicate
via the satellite, regardless of their location. Otherwise, two
outposts can communicate by radio only if the distance between
them does not exceed
Your job is to determine the minimum
Input
The first line of input contains
Output
For each case, output should consist of a single line giving
the minimum
Sample Input 1 | Sample Output 1 |
---|---|
1 2 4 0 100 0 300 0 600 150 750 |
212.13 |