编程介的小学生 2017-12-04 04:49 采纳率: 20.5%
浏览 993
已采纳

TT

Problem Description
Association of Collision Management (ACM) is planning to perform the controlled collision of two as-teroids. The asteroids will be slowly brought together and collided at negligible speed. ACM expects asteroids to get attached to each other and form a stable object. Each asteroid has the form of a convex polyhedron. To increase the chances of success of the experiment ACM wants to bring asteroids together in such manner that their centers of mass are as close as possible.
To achieve this, ACM operators can rotate the asteroids and move them independently before bringing them together. Help ACM to find out what minimal distance between centers of mass can be achieved. For the purpose of calculating center of mass both asteroids are considered to have constant density.

Input
Input file contains two descriptions of convex polyhedra.
The first line of each description contains integer number n indicate the number of vertices of the polyhedron (4 <= n <= 60). The following n lines contain three integer numbers xi; yi; zi each --- the coordinates of the polyhedron vertices (-10000 <= xi, yi, zi <= 10000). It is guaranteed that the given points are vertices of a convex polyhedron, in particular no point belongs to the convex hull of other points. Each polyhedron is non-degenerate. The two given polyhedra have no common points.

Output
Output one floating point number --- the minimal distance between centers of mass of the asteroids that can be achieved. Your answer must be round up to 0.01.

Sample Input
8
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
5
0 0 5
1 0 6
-1 0 6
0 1 6
0 -1 6

Sample Output
0.75

  • 写回答

1条回答 默认 最新

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

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题