#Lutece0399. Refraction I
Refraction I
Migrated from Lutece 399 Refraction I
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Refraction is a common phenomena in our life. Now ,comes a problem. Give you a kind of liquid and its refractive index, you should calculate the focus of the light on the ground(Point in the picture below).
To let the problem easier,we assume that the air's refractive index is always . As the picture below,the light source is always in the air(the point in the picture). We assume the coordinate of ground level is .
Input
The first line of the data contains a number (), indicating the total number of test cases. Each test case consists of lines .The first line contains numer , indicating the coordinate of the light and the coordinate of the direction respectively. The second line contains numbers , , indicating the refractive index of the liquid and the depth of the liquid.
Output
For each test case, write a single float numbers on a single line, indicating the coordinate of the focus,retain digits after the decimal point.
If there is not focus on the ground ,just output Impossible
on a single line.
Samples
3
3 6 0 6
1.35 3
3 6 0 3
1.35 3
3 6 3 3
1.35 3
Impossible
-1.845
3.000
Resources
10th SCU Programming Contest Final