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

建议使用的浏览器:

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

4748:Area

题目描述
  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.
输入解释
  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.
输出解释
  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.
输入样例
2
1
0 0 2
0 0 -2
1
0 0 2
0 0 -2.5
输出样例
Case #1: 50.00000%
Case #2: 55.00000%
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-4748

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

共提交 0

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