Angry Birds Again

Time Limit: 1000ms
Memory Limit: 65768KB
This problem will be judged on HDU. Original ID: 3968
64-bit integer IO format: %I64d      Java class name: Main

Description

luyi0619 loves playing the popular game – angry bird. You haven’t heard about it? Oh, my god! You are out, I think. The following hyperlink to Wikipedia will help you.

http://en.wikipedia.org/wiki/Angry_Birds

Every day, he spends lot of time playing the game. You know, as time goes, he will be bored. This time, when he hits a pig successfully he wants to calculate the distance that bird covers. As a clever programmer, can you help him to solve the problem?

The gravity acceleration is 9.80 m/s^2.

Input

The first line contains only one integer T (T is about 100) indicates the number of test cases.

For each case there are five integers x0,y0,x1,y1,t;

x0,y0 is the bird’s position.

x1,y1 is the pig’s position.

t is the time that the bird used to cover the distance.

All integers above are non-negative and in the range [0,100]

x0 and x1 are never equal.

Output

One line for each case specifying the distance rounded to three digits. If the pig can’t be hit in the given time, output “Impossible.” without the quotes.

Sample Input

1
0 0 2 2 1

Sample Output

3.687

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .