编程介的小学生 2017-08-22 16:40 采纳率: 20.5%
浏览 796
已采纳

Balloon

The weather is wonderful today. Gao takes a walk in the garden with his girlfriend. His girlfriend likes balloons so much, so that she wants to fly some balloons (not kites!) in the garden.

We can regard the garden as a three-dimensional space, and its coordinate starts from (0,0,0) to (10000,10000,10000). There are N groups of balloons, each of groups has a red balloon and a blue balloon. We can regard each balloon as a sphere, all the radius of spheres are R. The center of each sphere will be given in the input.

For some reasons, she wants to choose one balloon (red one or blue one) from each group, so that she can put exactly N balloons in the garden. It's obvious that there is no overlap for any two balloons in the N balloons which she selected. The largest R will make Gao's girlfriend happiest. Can you help Gao to calculate the largest R?

Input

There are multiple cases. For each case, The first line contains an integer N (2 ≤ N ≤ 200), meaning there are N groups of balloons. In the next N lines, each line contains six integers, indicating the coordinates of two balloons.

NOTICE: The garden only limits the center of the balloon.

Output

For each test case, it contains one real number indicating the largest R. The results should be rounded to three decimal places. You should promise that there is still no overlap for any two balloons after rounded.

Sample Input

2
1 1 1 5 5 5
1 1 1 5 5 5
Sample Output

3.464

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-08-27 14:52
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度