|
||||||||||
AreaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 301 Accepted Submission(s): 33 Problem Description To make sure that our company has the most immutable mobile phone all over the world, the Mokia decide to monitor all the cellphones on Earth. They have launched two satellites in order to track the information about hardness of the mobile phones. Although the satellites are able to scan all the mobile phones visible to them, unfortunately, with only two satellites, our Mokia can't cover all surface on Earth simultaneously. One satellite can only monitor the surface which is unblock to its current location. The satellite can only be blocked by the Earth itself, that is to say, one point of the Earth's surface is visible to one satellite if and only if the line between this point and the satellite does not intersect with Earth. No relativistic effects are considered. The CEO of Mokia, Steve, wants to get the current coverage ratio of the satellites. Since we only know the current location of the satellites, it is very hard to know the exact number of ratio. To simplify this task, we can consider Earth as a perfect sphere of radius R. With this simplification, and the locations of the satellites, this task is pretty easy. Input The input file leads with one line contains the number of test cases T. (T <= 1000) For each test case, the first line contains only one real number R (0.01 <= R <= 10000), indicating the radius of Earth. The second line and third line each contains three real numbers, indicating the current location of the two satellites (-100000 <= x, y, z <= 100000). And you may assume the origin of coordinate system is located on the center of Earth, and two satellites are above the surface of Earth. Also, all real numbers have at most two digits after the decimal point. Output For each test cases, output only one line with the test number and the coverage of the two satellites. All coverage should be presented as percentages and rounded to five decimal places. Sample Input
Sample Output
Source | ||||||||||
|