PIR - Pyramids

题意翻译

给定t个三棱锥的六条边,求它的体积。 输入:第一行一个整数t,表示数据组数,之后t行每行六个正整数,表示三棱锥的六条边,顺序是AB, AC, AD, BC, BD, CD。 输出:对于每一个三棱锥,输出一个浮点数表示体积(精确到小数点后四位)。 边的长度不超过1000 Translated by @稀神探女

题目描述

Recently in Farland, a country in Asia, the famous scientist Mr. Log Archeo discovered ancient pyramids. But unlike those in Egypt and Central America, they have a triangular (not rectangular) foundation. That is, they are tetrahedrons in the mathematical sense. In order to find out some important facts about the early society of the country (it is widely believed that the pyramid sizes are closely connected with Farland's ancient calendar), Mr. Archeo needs to know the volume of the pyramids. Unluckily, he has reliable data about their edge lengths only. Please, help him!

输入输出格式

输入格式


t \[number of tests to follow\] In each of the next t lines six positive integer numbers not exceeding 1000 separated by spaces (each number is one of the edge lengths of the pyramid ABCD). The order of the edges is the following: AB, AC, AD, BC, BD, CD.

输出格式


For each test output a real number - the volume, printed accurate to four digits after decimal point.

输入输出样例

输入样例 #1

2
1 1 1 1 1 1
1000 1000 1000 3 4 5

输出样例 #1

0.1179
1999.9937