F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Angry Birds Again

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)
Total Submission(s): 692    Accepted Submission(s): 235


Problem 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
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-04-01 07:47:36, Gzip enabled