2307: Distance

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:70 解决:19

题目描述

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.

样例输入 复制

1.0 2.0 3.0 4.0
15.0 23.0 46.5 7.0

样例输出 复制

140.01
67.61

提示

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

来源/分类