编程介的小学生 2017-08-03 06:52 采纳率: 20.5%
浏览 642
已采纳

Knockdown

The Evil Empire is devising a plan to destroy the world. This plan is called "Operation Knockdown".

The plan is to place a number of high-yield nuclear bombs in different places around the world, so that their simultaneous detonation will destroy everything on the planet. For the purpose of planning this operation, bombs have destruction distance - the distance from the point of bomb's detonation to all the places where everything is considered destroyed.

Places for the bombs have been already selected. Now the Evil Empire wants to minimize the cost of production for the bombs. It is expensive to design atomic bombs tailored for different destruction distances, so the idea is to design a bomb with a specific destruction distance and to produce bombs according to this design for all the selected places. The problem is to find the minimal required destruction distance for the bomb design, so that destruction of the whole world is ensured.

For this problem the world is modeled as a sphere of a unit radius. The coordinates of the selected points for the bombs are specified in geographic coordinate system with latitude (-90< < 90) and longitude(-180<≤ 180). Latitude is the angle between a point and the equator, and longitude is the angle between a point and the prime meridian. The bombs are never placed on the poles, so their latitude is always less than 90 degrees by its absolute value.

Distances for destruction purposes are measured on the sphere. For example, the distance between the poles is exactly . The world is considered destroyed if the distance from any point on the sphere to the closest bomb is less or equal to the destruction radius.

Input

There are several test cases in the input. The first line of each case contains a single integer number n (1 ≤ n ≤ 20) - The number of the bombs. The following n lines describe the places of the bombs. Each line contains two integer numbers and(-90<< 90, -180 <≤ 180) - latitude and longitude of the bomb. No two bombs are situated in the same place. Proceed to the end of file.

Output

For each test case, write to the output a single number - the minimal destruction radius of the bombs that ensures destruction of the whole world. The answer must be precise up to 10-6 .

Sample Input

4
59 30
53 83
41 69
41 41
2
35 15
-35 -165
Sample Output

2.864479
1.570796

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-08-17 15:54
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)