|
||||||||||
Building DesignTime 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
Sample Output
Source | ||||||||||
|