当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

4458:Shoot the Airplane

题目描述
XXX is playing an interesting game which is based on a 2D plane. In this game, he is required to shoot an airplane. The airplane flies horizontally. The shape of it can be regarded as a simple polygon. Player has to shoot at point (0, 0) upward vertically. Because the bullet is very small, it can be regarded as a point. The airplane is hit only if the bullet goes into the airplane. The airplane is not hit if the bullet only touches the edge of the airplane. The gravity should be considered. The acceleration of gravity is g and its direction is downward vertically. So the speed of the bullet may be change during flying. But the speed of airplane is constant because it has engines. XXX wants to know the time it takes the bullet to hit the airplane after shooting.
输入解释
There are multiple cases.
In each case, there are three integers v (-10<= v <= 10), b (1 <= b <= 10), g (0 <= g <= 10) in the first line. v denotes the speed of airplane. The flying direction is from left to right if v is positive and the direction is from right to left if v is negative. b denotes the initial speed of bullet. g is the acceleration of gravity. Then the input will describe the position of the airplane when XXX shoots. In the second line, there is one integer n (3 <= n <= 20) which represents the number of vertexes of the airplane (polygon). In each of the next n lines, there are two integers x (-100 <= x <= 100), y (0 <y<= 100) which give the position of a vertex in order. There is a blank line after each case. The input ends with 0 0 0.
输出解释
If the airplane is hit, then output the time it takes the bullet to hit it after shooting in one line. The answer should be rounded to 2 digits after decimal point. If the airplane is not hit, then output “Miss!” in one line.
输入样例
-10 10 2
9
6 9
10 9
10 16
25 16
25 20
10 20
10 27
6 27
-10 18

-10 10 2
9
6 9
10 9
10 16
20 16
20 20
10 20
10 27
6 27
-10 18

0 0 0
输出样例
2.00
Miss!
来自杭电HDUOJ的附加信息
Recommend

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4458

最后修改于 2020-10-25T23:13:43+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)