#P5735. 【深基7.例1】距离函数

【深基7.例1】距离函数

Description

Given the coordinates of three points on the plane that are not on the same straight line (x1,y1),(x2,y2),(x3,y3)(x_1,y_1),(x_2,y_2),(x_3,y_3), where the coordinate values are real numbers and their absolute values do not exceed 100.00, find the perimeter of the triangle formed by them. Keep two decimal places.

For two points on the plane (x1,y1),(x2,y2)(x_1,y_1),(x_2,y_2), the distance between them is dis=(x2x1)2+(y2y1)2dis=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}.

Input Format

Input consists of three lines. The ii-th line gives the coordinate (xi,yi)(x_i,y_i), separated by one space.

Output Format

Output a number with two decimal places, representing the perimeter of the triangle formed by these three points.

0 0
0 3
4 0
12.00

Hint

The testdata guarantees that all coordinates are real numbers and their absolute values do not exceed 100100, with at most 33 digits after the decimal point.

Translated by ChatGPT 5