Welcome to ZOJ Problem Sets Information Select Problem Runs Ranklist ZOJ Problem Set - 4055
Kuririn MIRACLE

Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge

As we know, DreamGrid is a master of planning algorithm. Recently, a new type of autonomous car appears in Gridland. With the shape of a circle, the car can move in any direction. Being interested in this car, DreamGrid decides to design a specific path planning algorithm for it. Here is the first case he wants to solve.

Consider two cars on the two-dimensional plane with the same radius of $r$. We now want to move the center of the first car from $(0,0)$ to $(d,0)$, where $d$ is positive. The second car, starting its move with its center located at $(2r, 0)$, can be considered as an obstacle moving towards the positive direction of the x-axis with a constant speed of $v$. Luckily, after installing a new engine, the first car can move twice as fast as the obstacle car, which means the maximum speed of the first car can be $2v$.

DreamGrid wants to know the shortest time needed to move the first car to the end point without colliding with the second car. That is to say, before arriving at the end point, the circle representing the first car can't intersect with (but can be tangent to) the circle representing the second car.

As DreamGrid is too busy, you are asked to solve this simple problem for him. Of course, if you successfully solve this problem, you will get a brand-new autonomous car in the Gridland!

Input

There are multiple test cases. The first line of the input is an integer $T$($1 \le T \le 1000$), indicating the number of test cases. For each test case:

The only line contains three real numbers $v, r, d$ ($1 \le v, r \le 10, 1 \le d \le 100$) with at most two digits after the decimal point, indicating the radius of the car, the speed of the obstacle car and the distance between the start point and end point.

Output

For each test case output one line, indicating the shortest time for the first car to arrive the end point without colliding with the second car. Your answer will be considered correct if and only if the absolute error or relative error of your answer is less than $10^{-6}$.

Sample Input

1
2.00 3 30.0


Sample Output

8.310579933902352

Author: JIN, Mengge
Source: The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online
Submit    Status