UNIR - Universal Radius

Given two points A and B that are the center of two circle. The two circle are equal is size and tangent externally. you have to find the radius of the circles. See the picture below:

Tangent Circles

Input

Input starts with an integer T (≤ 250), denoting the number of test cases. Each case contain four integers x1, y1, x2, y2 (-106x1, y1, x2, y2 ≤ 106) where x1 and y1 are coordinates of the first point and x2 and y2 are coordinates of the second point. It is guaranteed that the given points are distinct.

Output

For each case, print the answer to the problem which describe above. Answer round with 6 decimal places.

Example

Input:
2
0 1 5 10
-2 -1 -4 -9

Output:
5.147815
4.123106

Problem setter: Shipu Ahamed, Dept. of CSE Bangladesh University of Business and Technology (BUBT)


Added by:Shipu Ahamed
Date:2014-09-14
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2018-08-20 08:09:29
No floats in input, my code was designed to crash if it was otherwise but got AC.
2014-10-18 19:11:45 wisfaq
Please add that the answer must be rounded to 6 places after the decimal point.
shipu -> thanks, now it's fixed @wisfaq

Last edit: 2014-09-17 17:35:58
2014-10-18 19:11:45 ivar.raknahs
Wrong input declaration . Inputs are in float.
Correct it.
Costed me 2 WA.

@Shipu -> there are no float inputs in dataset. see Input Section in problem description...

Last edit: 2014-10-18 19:01:29
2014-10-18 19:11:45 mehrab alam
@Shipu Ahamed correct input statement inputs are in floats

@Shipu -> there are no float inputs in dataset. see Input Section in problem description...

Last edit: 2014-10-18 19:03:06
2014-10-18 19:11:45 Wonderwice Margera
For fun, we should change it to a challenge problem with score = number of characters in answer.

Last edit: 2014-09-15 11:32:42
2014-10-18 19:11:45 Ayush Agarwal
In the problem it's mentioned the coordinates of the two centers will integers, but in the test cases, there are non integral coordinates too!!!

Last edit: 2014-09-15 10:56:17
2014-10-18 19:11:45 Raghav Aggiwal
Piece of cake !!
2014-10-18 19:11:45 Shipu Ahamed
@Ayush Agarwal : Find out by yourself...
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.