Time Limit: Java: 2000 ms / Others: 2000 ms
Memory Limit: Java: 65536 KB / Others: 65536 KB
Obviously, following the paths given by these maps may lead to an interesting tour of the local scenery, but if one is in a hurry, there is usually a much faster way: just march directly from your starting point to the place where the treasure is buried. Instead of taking three steps north, one step east, one step north, three steps east, two steps south and one step west (see figure), following the direct route (dashed line in figure) will result in a path of about 3.6 steps.
You are to write a program that computes the location of and distance to a buried treasure, given a `traditional' map.
Print a blank line after each test case.
Map #1 The treasure is located at (3.000,2.000). The distance to the treasure is 3.606. Map #2 The treasure is located at (-7.071,7.071). The distance to the treasure is 10.000.