Prison Break

0

0 votes
Problem

Michael Scofield makes an escape plan to break out from Fox Rriver State Penitentiary. But Officer Bellick knows the plan and he wants to catch Scofield red handed to prove his point to Warden Henry. At 1AM Bellick climbs up a watch tower of height h metres and monitors every movement. He knows the path which Scofield will follow. Now Bellick has new equipment called ‘Bow Arrow Net Catcher’ or BANC. This bow releases a arrow and after travelling a distance d metres a net opens up which catches the suspect. Assume the time taken by the arrow to travel the distance d as neglible and d is greater than the height of the tower. Scofield being extremely clever is hiding just below the tower. But he has to make a move. So he slowly starts to move forward and as a result Bellick spots him. But he can’t fire BANC due to its limitations. The moment Bellick finds that it is the right time to fire his weapon Scofield turns his head and sees Bellick and starts running with a constant velocity v m/s. Bellick doesn’t want him to escape so he starts coming down the tower. You are the night watchman of that tower and a great mathematician. You have to tell Bellick with what initial velocity u m/s he should go down so that he can fire BANC and catch Scofield.

Input:

The input will contain of T test cases. Every next T lines will contain h d v.

Output:

For every test Case T you need to print u rounded upto 9 decimal places.

Constraints:

0 < T < 10000

0 < h < 100000

h < d < 1000000

0 < v < 50

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?