|
||||||||||
AircraftTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1434 Accepted Submission(s): 392 Problem Description You are playing a flying game. In the game, player controls an aircraft in a 2D-space. The mission is to drive the craft from starting point to terminal point. The craft needs wireless signal to move. A number of devices are placed in the 2D-space, spreading signal. For a device Di, it has a signal radius -- Ri. When the distance between the craft and Di is shorter or equal to Ri, it(the craft) gets Di's wireless signal. Now you need to tell me the shortest path from starting point to terminal point. Input The first line of the input file is a single integer T. The rest of the test file contains T blocks. Each block starts with an integer n, followed by n devices given as (xi, yi, Ri). (xi, yi) is position of Di, and Ri is the radius of its signal range. The first point is the starting point. The last point is the terminal point. T <= 25; 2 <= n <= 20 for most cases; 20 < n <= 25 for several cases, completely random generated. -1000 <= xi, yi <= 1000 , 1 <= ri <= 1000. All are integers. Output For each case, Output "No such path." if the craft can't get to the terminal point. Otherwise, output a float number, correct the result to 4 decimal places.(as shown in the sample output) Sample Input
Sample Output
Source | ||||||||||
|