F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

The battle on X-Star

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 526    Accepted Submission(s): 108


Problem Description
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.
 

Input
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.
 

Output
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.
 

Sample Input
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
 

Sample Output
9.749 God Bless Him! 0.000 0.766
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:53:26, Gzip enabled