아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Driving the Gnu

시간 제한2초메모리 제한256 MB

요약
속도 v로 달리는 자동차가 거리 d 앞에 놓인 길이 w의 수직 선분을 피해야 할 때, 충돌을 피하기 위해 필요한 최소 가속도 크기를 구한다.
난이도

보통10점 중 7점

유형
기하, 수학, 이분 탐색
정답자
아직 제출이 없습니다

문제

Adam Kazimirovicz is racing his car, the Gnu, at the speed of vv, across the vast cathedral square. Suddenly, a priest appears in his way, trying to fool Adam. The priest is a segment of the length ww, perpendicular to Adam's trajectory, with its center on the trajectory. The initial distance between the car and the priest is dd.

Enter Ostap --- he overrides Adam's panicked driving in an attempt to avoid the collision with the priest. For this purpose, he can accelerate the car at every moment in any direction. Note that at different moments in time, both the module and the direction of the acceleration can be changed. However, Ostap is not omnipotent; hence, the acceleration magnitude at each moment in time cannot be greater than aa.

Find the minimal possible value of aa sufficient to avoid the collision.

입력

The first line of the input file contains an integer TT --- the number of test cases (1≤T≤5⋅1041 \le T \le 5 \cdot 10^4).

The following TT lines each contain three integers vv, dd and ww --- the initial velocity of the car, the initial distance from the Gnu to the priest, and the length of the segment (1≤v,d,w≤10001 \le v, d, w \le 1000).

출력

The output file must contain TT lines, the iith line must contain the answer to the iith test case. The answer is the minimal possible value of aa sufficient to avoid a collision.

The absolute or relative error of each answer must not be greater than 10−1010^{-10}.

예제1

  1. 예제 1

    입력
    1
    10 3 1
    
    예상 출력
    10.510002209123385