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.
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.
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.
5 0 0 0 0 0 4 0 4 0 4 0 0 1 1 1 0
10.67
Migrated from old NTUJ.
pP
No. | Testdata Range | Score |
---|