#P1027. Perimeter of Triangles

    ID: 28 远端评测题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>深圳技术大学第一届程序设计竞赛(SZTUCPC2021)

Perimeter of Triangles

Description

Calculate the perimeter of the triangle surrounded by three lines.

Input

There are multiple test cases.

In each test case, three straight lines are described by two points on them respectively.

Each point is represented by its coordinates (x, y).

In other words, each test case is described by six point coordinates, that is, twelve numbers.

All the coordinates are integers and in range [0, 10000].

It is guaranteed that the three straight lines of each test case will not be parallel or overlapped.

Output

Output the perimeter of the triangle corresponding to each test case.

The result should be accurated to three decimal places.

0 0 0 3
0 0 4 0
0 3 4 0
1 0 3 0
1 1 3 3
0 4 4 0
12.000
9.657