There are a tetrahedrons and b spheres in the 3D-splace, you’re asked to calculate the volume occupied by at least one of them (i.e. volume of the union of the objects).
There will be at most 20 test cases. Each case begins with two integers a, b, the number of tetrahedrons and the number of spheres (1<=a,b<=5). The next a lines each contains 12 integers: x1, y1, z1, x2, y2, z2,x3, y3, z3, x4, y4, z4, the coordinates (xi, yi, zi)(1<=i<=4) of the four vertices of a tetrahedron. The next blines each contains 4 integers x, y, z, r, the coordinates of the center (x, y, z) and the radius r (r<=3). All the coordinate values are integers with absolute values no more than 5. The input is terminated by a=b=0.
For each test case, print a single line, the volume occupied by at least one of them, rounded to three decimal points.
1 1 0 0 4 1 0 4 0 1 4 0 0 5 0 0 0 1 0 0
4.356
Tips:
请对本次比赛进行一些描述,公告内容应当包含:
比赛的创办者或组织;
本次比赛的目的或意义;
本次比赛的考点、语言或类型;或其他注意事项及描述等。
至少保证30个汉字长度。