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

建议使用的浏览器:

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

2684:Astar

题目描述
A 3-dimensional shape is said to be convex if the line segment joining any two points in the shape is entirely contained within the shape. Given a general set of points X in 3-dimensional space, the convex hull of X is the smallest convex shape containing all the points.
For example, consider X = {(0, 0, 0), (10, 0, 0), (0, 10, 0), (0, 0, 10)}. The convex hull of X is the tetrahedron with vertices given by X.

Given X, your task is to find the girth of the convex hull of X, rounded to the nearest integer.

You may assume there will be at most 3 points in X on any face of the convex hull.
输入解释
The input test file will contain multiple test cases, each of which begins with an integer n (4 ≤ n ≤ 25) indicating the number of points in X. This is followed by n lines, each containing 3 integers giving the x, y and z coordinate of a single point. All coordinates are between −100 and 100 inclusive. The end-of-file is marked by a test case with n = 0 and should not be processed.
输出解释
For each test case, write a single line with the girth of the convex hull of the given points. The answer should be rounded to the nearest integer
输入样例
5
0 0 0
10 0 0
0 10 0
0 0 10
1 1 1

4
0 0 0
1 0 0
0 1 0
0 0 1
0
输出样例
72
7
来自杭电HDUOJ的附加信息
Author WhereIsHeroFrom
Recommend yifenfei

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

源链接: HDU-2684

最后修改于 2020-10-25T22:55:54+00:00 由爬虫自动更新

共提交 0

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