/ OPS / 题库 /

Tetrahedron

Tetrahedron

#描述#
Being a good coder needs many basic mathematics shills. In computing geometry,the vector operations has theirs special meanings. Now, the problem is that giving you the four vertex points of a tetrahedron, compute the volume of it.

#格式#
##输入格式##
The first line of input contains a integer n,meaning there are n test cases followed.
Each test case will contain four lines which represents four points. Each line contains three integers,which mean the x , y and z of a point.(0&ltn&lt1000,-500&ltx,y,z&lt500).

##输出格式##
For each test case,output an double type number one line given with accuracy “10.3” representing the volume of the tetrahedron.
If the four point in a same plane,output -1.

#样例1#
##样例输入1##

2
1 1 1
2 2 2
3 3 3
4 4 4
0 0 0
5 0 0
0 5 0
0 0 5

##样例输出1##

-1
20.833

#限制#
1000ms
32768KB

#提示#

#来源#
lily

信息

ID
1397
难度
5
分类
category1 点击显示
标签
递交数
0
已通过
0
通过率
?
上传者