问题1447--Distance

1447: Distance

时间限制: 1 Sec  内存限制: 32 MB
提交: 154  解决: 34
[状态] [讨论版] [提交] [命题人:]
题目描述

There is a battle field. It is a square with the side length 100 miles, and unfortunately we have two comrades who get hurt still in the battle field. They are in different positions. You have to save them. Now I give you the positions of them, and you should choose a straight way and drive a car to get them. Of course you should cross the battle field, since it is dangerous, you want to leave it as quickly as you can!

输入

There are many test cases. Each test case contains four floating number, indicating the two comrades' positions (x1,y1), (x2,y2).

Proceed to the end of file.

输出

you should output the mileage which you drive in the battle field. The result should be accurate up to 2 decimals.

样例输入 Copy
1.0 2.0 3.0 4.0
15.0 23.0 46.5 7.0
样例输出 Copy
140.01
67.61
提示

The battle field is a square local at (0,0),(0,100),(100,0),(100,100).

来源/分类