Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
Խնդիրը թաքցված է
TETRA - Sphere in a tetrahedron |
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).
Input
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.
Output
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.
Example
Input: 2 1 1 1 1 1 1 1000 999 998 5 5 6 Output: 0.2041 1.4189
Ավելացրեց. | Adam Dzedzej |
Ամսաթիվ. | 2004-05-11 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK NEM NIM NODEJS OBJC-CLANG PERL6 PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL VB.NET WHITESPACE |