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

建议使用的浏览器:

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

4378:The battle on X-Star

题目描述
There is a special planet in universe called "X-Star". The X-Star is a regular sphere with a radius of R meters. Unfortunately, a tremendous battle is in progress on "X-Star". Many aliens were landed on X-Star and find their unique place to settle down. Each alien's place can be defined as latitude and longitude of the "X-Star". These aliens have a special magical skill, which is extremely powerful. This skill can only be released by two different aliens. After it was released, there will occur a great circle on the plant’s surface, which just through the place between the two aliens who have released it. That is to say, the great circle will pass the middle point between their places and have same distance to the two aliens.

The great circle will exert a special force, which will affect the general of X-Star. The general of X-Star now is governing the army, and he will have a velocity of h*k*v0 m/s (here k is a constant value and v0 is the general's normal speed) when his distance to the great circle is h due to the special force, in other words, h is the height of his current location to the plane of the great circle. The wise general will take this action when the great circle occurs: run away from the great circle as far as possible (here "run" means move on the X-Star's surface), no matter there will be some aliens or not. Now he need to know when two certain aliens released the skill, how many seconds does he needed to take his action from several certain location at least.
There will be n aliens landed on X-Star and the general will ask you m possible scenarios.
输入解释
Multiple test cases, process to the end of input.
For every case, there are several lines.
The first line is two integer n (1 ≤ n ≤ 10000) and m (1 ≤ m ≤ 1000) and a real number R (0 < R ≤ 1e11) as described above.
The following n lines contain the aliens' settled places. Each line have two real number, which represents the i-th (i started from 0) alien's latitude and longitude on the X-Star.
The following 3*m lines contain m possible scenarios. Each scenario contains three lines, the first line is two different aliens' indices (started from 0) who will release the skill, and the second line is the general's current location's latitude and longitude, and the third line contains k (0 ≤ k ≤ 5) and v0 (0 ≤ v0 ≤ 5) described above.
All latitudes are between -90 and 90 inclusive, and all longitudes are between -180 and 180 inclusive. It is guaranteed that all the aliens’ locations are different from each other.
输出解释
For each possible scenario, output one line of a real number with 3 digits after decimal point, which is the shortest time for the general to take the action with that scenario.
If the general can not take his action at some scenarios , you just need to output "God Bless Him!”. It means you needn't to output the time. See samples for more details.
Output an empty line after each test case.
输入样例
2 3 6380000.0
5.5 0.0
-5.5 0.0
0 1
9.99 50.5
0.5 0.5
0 1
10.0 99.0
0.0 1.11
0 1
90.0 0.0
1.0 1.0

2 1 3450.0
55.5 -77.8
-44.4 140.6
0 1
12.3 -66.6
1.0 1.0
输出样例
9.749
God Bless Him!
0.000

0.766
来自杭电HDUOJ的附加信息
Recommend zhuyuanchen520

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

源链接: HDU-4378

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

共提交 0

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