#P5931. [清华集训 2015] 灯泡
[清华集训 2015] 灯泡
Description
Compared with Wildleopard’s home, his younger brother Mildleopard is poorer. His house is narrow, and there is only one light bulb in his room. Every night, he walks around in his small house, thinking about how to earn more money. One day, he found that the length of his shadow changes as he walks between the light bulb and the wall. A sudden idea came to his mind: he wants to know the maximum possible length of his shadow in the room.

Input Format
The first line contains an integer , the number of test cases.
For each test case, there is one line containing three real numbers , , and . is the height of the light bulb, is Mildleopard’s height, and is the horizontal distance between the light bulb and the wall.
Output Format
Output lines. For each test case, output one line with the maximum shadow length . Your answer is accepted if the absolute error compared with the standard output is at most .
3
2 1 0.5
2 0.5 3
4 3 4
1.000
0.750
4.000
Hint
Constraints: , , . It is guaranteed that , , and have at most digits after the decimal point.
Translated by ChatGPT 5
京公网安备 11011102002149号