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

建议使用的浏览器:

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

6167:Missile Interception

题目描述

A country's defense department has been informed there are n enemy's missile silos in an area. To avoid potential threat, DOD plans to build up a missile defense base to ensure any enemy's missiles can be shot down once they have been launched. Due to a tight budget, only one defense base can be built(which means all defense missiles can only be launched at one position). DOD knows the best strategy is to minimize the longest time required to intercept any enemy's missiles. The good news is that DOD has got a confidential document which reports each enemy's missiles' parameter, including their launching coordinate, direction and speed. DOD is free to launch its defense missile in any direction, but only AFTER enemy's missile has launched (or serious diplomatic crisis could occur).
To simply the problem, we regard the area as a 2D plane. A missile can only fly alone a straight line with a fixed speed (its initial speed) and never comes down, until it successfully intercept or being intercepted by another missile. Now DOD wants to know with the best strategy described above, what's the longest time required to intercept any enemy's missile.
Note again, DOD doesn't need to intercept enemy's missiles as soon as they have been launched. The only requirement is not to launch the defense missile before enemy's missile.
输入解释
Multiple test cases (not exceed 5).
For each test case:
&#8226;  The first line contains two numbers n,V(2≤n,V <= 100), indicating the number of enemy's missiles and the speed of all defense missiles;
&#8226;  Then n lines follow. The ith line has 5 integers $x_i,y_i,dx_i,dy_i,v_i$, which means a enemy's missile can be launched at coordinate $(x_i,y_i)$ with direction vector $(dx_i,dy_i)$, and its speed is $v_i$.$(0≤|x_i|,|y_i|,|dx_i|,|dy_i|≤100,1≤v_i≤100)$
It's guaranteed V>$v_{max}$.
输出解释
For each test case, output one line indicating the longest time mentioned above. Keep 4 decimal places.
输入样例
2 2
2 0 3 0 1
0 0 3 1 1
2 2
0 0 0 1 1 
0 2 0 -1 1
输出样例
0.5081
0.3333
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6167

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

共提交 0

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