Walker
题号:NC214897
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
Special Judge, 64bit IO Format: %lld

题目描述

As a world-famous traveler, Prof. Pang's research interest is to travel as many places as possible in his life.

We have a segment . There are two travelers on it. The first one is on position p_1 with velocity v_1 (which means s/he can walk v_1 unit on the segment per second). The second one is on position p_2 with velocity v_2.

From their respective beginning points, travelers can walk on the segment. They cannot walk outside the segment. Whenever they want to change their direction, they can turn around immediately.

Please help Prof. Pang to calculate the minimum possible time by which every position of the segment is passed by at least one traveler.

输入描述:

The first line contains one integer  -- the number of test cases.

The i-th of the next test lines contains five numbers (, , ). All numbers have at most 3 digits after the decimal point.

输出描述:

For each test case, we should output one number -- the minimum time that every position of the segment is passed by at least one traveler.

Your answer is considered correct if its absolute or relative error does not exceed .
示例1

输入

复制
2
10000.0 1.0 0.001 9999.0 0.001
4306.063 4079.874 0.607 1033.423 0.847

输出

复制
5001000.0000000000
3827.8370013755