1027 : Perimeter of Triangles

时间限制Time Limit 1 Sec 内存限制Memory Limit 128 MB 提交次数Submitted 38 Times 通过次数Solved 13 Times 标准评测Standard Judge

题目描述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.

样例Sample

出题Author

CSGrandeur