#C3553. Marathon Effort Calculation
Marathon Effort Calculation
Marathon Effort Calculation
You are given a series of checkpoints along a marathon route. The first line of the input contains an integer n denoting the number of checkpoints. Each of the following n lines contains two integers representing the x and y coordinates of a checkpoint.
Your task is to compute the total effort required to complete the marathon. The total effort is defined as the sum of the Euclidean distances between consecutive checkpoints. The Euclidean distance between two points \((x_1, y_1)\) and \((x_2, y_2)\) is given by the formula:
\( d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} \)
Output the total effort rounded to two decimal places.
inputFormat
The input is given in the following format:
n x1 y1 x2 y2 ... xn yn
where n is the number of checkpoints, and each subsequent line contains two space-separated integers representing the coordinates of a checkpoint.
outputFormat
Output a single floating-point number representing the total effort, rounded to two decimal places.
## sample3
0 0
3 4
6 8
10.00