#P1433. 吃奶酪
吃奶酪
Description
There are pieces of cheese in a room. A little mouse wants to eat them all. What is the minimum distance it must run? The mouse starts at point .
Input Format
The first line contains an integer , the number of pieces of cheese.
Lines to each contain two real numbers. The real numbers on the -th line represent the coordinates of the -th piece of cheese.
Output Format
Output a single real number: the minimum distance required, with decimal places.
4
1 1
1 -1
-1 1
-1 -1
7.41
Hint
- Constraints
For all test points, it is guaranteed that , , and there are at most digits after the decimal point.
- Hint
For two points and , the distance formula is .
: A new set of testdata has been added.
Translated by ChatGPT 5
京公网安备 11011102002149号