Problem B
Framhjá Polli
Languages
en
is
Jörmunrekur needs to get from one place to another, but he’s not quite sure how long it’ll take him. He might not be able to walk directly between those end points since there is a large puddle he can’t step into. As we all know puddles are perfectly circular. We have his initial and desired final position, along with the size and location of the puddle. Can you figure out how far he has to walk?
Input
The input starts with four floating point numbers
Output
Print the distance Jörmunrekur has to travel in the best
case if he’s not allowed to step in the puddle. The answer is
considered correct if the absolute or relative error is at most
Sample Input 1 | Sample Output 1 |
---|---|
8 10 2 2 5 6 1.5 |
10.45346997 |
Sample Input 2 | Sample Output 2 |
---|---|
10 10 -10 10 0 0 8 |
20.0 |
Sample Input 3 | Sample Output 3 |
---|---|
-3 -3 12 4 0 0 4 |
17.77046301 |