F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Astar

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 148    Accepted Submission(s): 15


Problem Description
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.
 

Input
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.
 

Output
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
 

Sample Input
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
 

Sample Output
72 7
 

Author
WhereIsHeroFrom
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 11:56:50, Gzip enabled