| IME++ Starters Try-outs 2023 |
|---|
| Finished |
At his university, Sakai has been tasked with shooting cannons and discovering how far they will go. However, since he's shooting the cannons from a beach, they land in the water and he's unable to say where it exactly landed. Because of this, he asks two friends for help, Evelyn and Gandolfi, to find out what the distance is. Each of his friends is equipped with a device that is able to precisely find out the coordinates of the cannon ball once in its trajectory. These coordinates indicate the height the projectile is at a certain distance from the cannon.
Given the projectile's trajectory is a perfect parabola, and considering the cannon to be positioned at the origin of the coordinate plane, can you help Sakai find out what the distance from the cannon the shot landed?
The first line contains a single integer, $$$T$$$, $$$(1 \leq T \leq 10^5)$$$ — the number of test cases.
Each test case is one line and contains four integers, $$$x_1$$$, $$$y_1$$$, $$$x_2$$$, $$$y_2$$$, $$$(1 \leq x_1, y_1, x_2, y_2 \leq 10^4, x_1 \neq x_2)$$$ — indicating the position where Evelyn and Gandolfi, respectively, spotted the projectile.
For each test case, output a real number — the total distance traveled by the projectile. Your answer will be considered correct if its absolute or relative error does not exceed $$$10^{-6}$$$, that being if your answer is $$$a$$$ and the jury's is $$$b$$$, then the judge will check if $$$\frac{|a - b|}{max(1, b)} \leq 10^{-6}$$$.
24 5 8 54 5 7 6
12.000000000000000 13.545454545454545
| Name |
|---|


