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

建议使用的浏览器:

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

4234:Moving Points

题目描述
Consider a number of Target points in a plane. Each Target point moves in a straight line at a constant speed, and do not change direction. Now, consider a Chaser point that starts at the origin, and moves at a speed faster than any of the Target points. The Chaser point moves at a constant speed, but it is capable of changing direction at will. It will ‘Catch’ a Target point, and then move from there to catch another Target point, and so on.
Given the parameters of the Chaser point and the Target points, what is the least amount of time it takes the Chaser point to catch all of the Target points? ‘Catch’ simply means that the Catcher and the Target occupy the same point in the plane at the same time. This can be instantaneous; there’s no need for the Catcher to stay with the Target for any non-zero length of time.
输入解释
There will be several test cases in the input. Each test case will begin with two integers
N C
Where N (1 ≤ N ≤ 15) is the number of Target points, and C (0 < C ≤ 1,000) is the speed of the Chaser point. Each of the next N lines will have four integers, describing a Target point:
X Y D S
Where (X,Y) is the location in the plane (-1000 ≤ X,Y ≤ 1,000) of that Target point at time 0, D (0 ≤ D < 360) is the direction of movement in Degrees (0 degrees is the positive X axis, 90 degrees is the positive Y axis), and S (0 ≤ S < C) is the speed of that Target point. It is assumed that all Target points start moving immediately at time 0.
The input will end with a line with two 0s.
输出解释
For each test case, output a single real number on its own line, representing the least amount of time needed for the Chaser point to catch all of the Target points. Print this number to exactly 2 decimal places, rounded. Output no extra spaces, and do not separate answers with blank lines.
输入样例
2 25
19 19 32 10
6 45 133 19
5 10
10 20 45 3
30 10 135 4
100 100 219 5
10 100 301 4
30 30 5 3
0 0
输出样例
12.62
12.54
来自杭电HDUOJ的附加信息
Recommend lcy

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

题目来源 SER2011

源链接: HDU-4234

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

共提交 0

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