TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Everyone may know "convex hull".
In 2-D spaces it means the set of points forming a convex polygon which envelopes all existing points.
Let's call the convex hulls in 3-D spaces as "convex body".
Now, given a set of points in R3, find the volume of the convex body of these points.

Input Format

The first line of each test case contains 4<= N<=100, the number of points.

Following N lines contain N coordinates, and each are composed by three integer number (x,y,z). These values will between -10000 and 10000.

If there's N=0 it indicates the last line of input file. There will be no four points on the same plane.

Output Format

For each case, print the volume of the convex body in a line as floating point number,
round to 2 digits after the decimal point.

Sample Input 1

5
0 0 0
0 0 4
0 4 0
4 0 0
1 1 1
0

Sample Output 1

10.67

Hints

Problem Source

Migrated from old NTUJ.

pP

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 262144 6