Time Limit: 1s
Memory Limit: 128MB
In geometry, a tetrahedron is a polyhedron composed of four triangular faces, three of which meet at each vertex. The calculation of Tetrahedron’s volume is very common in Computation Geometry.
In this problem, you should calculate the volume of a Tetrahedron, given the coordinates of its 4 vertices.
The first line contains the number of test cases t. (t <= 100)
For each test case there are a line containing 12 integers – x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, representing the coordinate of 4 vertices.
One line contains the case info and a float number —— the volume rounds to the thousands.
2 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0 0 0 1 0 1 0 1 0 0
Case #1: 0.000 Case #2: 0.167