TETRA - Sphere in a tetrahedron

题意翻译

题目描述: 给定一个四面体的六条棱长,求其内接球体的半径。 输入格式: 第一行输入一个数n,测试数据的数量。(n<=30) 之后n行每行六个整数,四面体的六条棱长。(棱长不长于1000) 对于四面体WXYZ,边的顺序WX,WY,WZ,XY,XZ,YZ。 输出格式: 对于每一个n,输出一个保留四位小数的实数,四面体内接球体的半径。

题目描述

Of course a Sphere Online Judge System is bound to have some tasks about spheres. So here is one. Given the lengths of the edges of a tetrahedron calculate the radius of a sphere inscribed in that tetrahedron (i.e. a sphere tangent to all the faces).

输入输出格式

输入格式


Number N of test cases in a single line. ( N <= 30 ) Each of the next N lines consists of 6 integer numbers -- the lengths of the edges of a tetrahedron separated by single spaces. The edges are not longer than 1000 and for the tetrahedron WXYZ, the order of the edges is: WX, WY, WZ, XY, XZ, YZ.

输出格式


N lines, each consisting of a real number given with four digits decimal precision equal to the radius of a sphere inscribed in the given tetrahedron.

输入输出样例

输入样例 #1

2
1 1 1 1 1 1
1000 999 998 5 5 6

输出样例 #1

0.2041
1.4189