Ellipsoid Volume

Time Limit: 10 Seconds
Memory Limit: 32768 KB
Special Judge

Angel is good at mathematics, but not is c.x. Angel always likes to solve some
strange mathematic problems. Now, C.x. gives Angel a very hard problem, which
he can't yet solve :(. Angel really doesn't know how c.x. can solve this problem,
so he asked his best friend, you, to write a program to solve the problem.

There are N ellipsoids in a three-dimensional space. You should calculate the
total volume of the N ellipsoids.

**Input**

For each testcase, first line contains an integer N (1 <= N <= 30). Then
N lines follow. Every line contains 6 numbers. They are ai, bi, ci, di, ei and
fi. The ellipsoid equation is:

(x-ai)^2/di^2 + (y-bi)^2/ei^2 + (z-ci)^2/fi^2 <= 1

All the ellipsoid are in range |x|<=0.5, |y|<=0.5, |z|<=0.5

Proceed to the end of file.

**Output**

For each testcase, you should output one number, indicating the volume of the
ellipsoid. The result should be a floating-point number, having 3 digits after
radix point. If your output is in range |YouAns - Sample Answer|<= 0.002,
we will accept your program.

**Sample Input**

2

0 0 0 .5 .5 .5

.25 .25 .25 .25 .25 .25

**Sample Output**

0.549

*
*

Author:

**HOU, Qiming**
Source:

**JIANG, Yanyan's Contest #1**
Submit
Status