编程介的小学生 2019-12-31 18:06 采纳率: 20.5%
浏览 65

Angry Birds Again 代码思想

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?