시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 100 | 22 | 12 | 14.634% |
Smurfs love to play computer game called SmurfCraft. In this game there are a number of power sources to be harvested. Lazy Smurf must build his new base. He already found the location of three unoccupied power sources, and now wants to build his base in a position that minimizes the total distance to all three of those power sources. This problem wouldn't be difficult (even for Lazy Smurf) if not for the fact that the game is played in 3D. Because Lazy Smurf skipped his geometry classes he doesn't know how to solve this problem. Help him.
There are three input lines, each contains three integers $x, y, z$ ($-10^9 \leq x, y, z \leq 10^9$) -- the coordinates of a power source.
Output the minimum possible total distance to all three of the power sources. Your answer will be accepted if relative or absolute error is less than $10^{-4}$.
0 0 0 20 0 0 10 20 0
37.320508