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

Building Design

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


Problem Description
You are a notable architect.
Recently, a company invites you to design their new building for them. It is not an easy task, because they make some strange claims to the new building:
1.Its shape should be the same as a convex polyhedron which they have given to you, though you can rotate it arbitrarily.
2.One face of the building should cling to the ground. (Of course! Have you ever seen a building only touch the ground by an edge, or a point, or even suspend in the air?)
3.They want the building to be as striking as possible. We call the highest point of the building as the ¡°peak¡±. The higher the peak is the more striking the building will be.
4.If there are many designs meet all claims above, the occupied land of the building should be less. In another word, the building's vertical projection area on the ground should be as small as possible.
Now, give you the relative positions of vertices of the building, please design the building and tell them H ¨C the height of the peak, as well as S - the projection area of the building in your best design.
 

Input
There are several test cases in the input.
Each test case begins with one integer n (1 ¡Ü n ¡Ü 50), indicating the number of vertices of the building.
Then n lines follow. Each line contains three integers x, y, z (-10000 ¡Ü x, y, z ¡Ü 10000), separated by spaces, indicating the relative positions of one vertex of the building.
The input ends with n = 0.
 

Output
For each test case, output two float numbers H and S in one line, separated by one space.
Please round the results to three digits after decimal point.
 

Sample Input
6 1 0 0 -1 0 0 0 1 0 0 -1 0 0 0 1 0 0 -1 0
 

Sample Output
1.155 1.732
 

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-11-22 09:53:10, Gzip enabled