P5735 [Shenji 7. Example 1] Distance Function
Description
Given the coordinates of three points on the plane that are not on the same straight line $(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 $(x_1,y_1),(x_2,y_2)$, the distance between them is $dis=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$.
Input Format
Input consists of three lines. The $i$-th line gives the coordinate $(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.
Explanation/Hint
The testdata guarantees that all coordinates are real numbers and their absolute values do not exceed $100$, with at most $3$ digits after the decimal point.
Translated by ChatGPT 5