Safe Places

There are n kinds (i.e. type-1, type-2, ..., type-n) of m satellites in the space. For each 1 ≤ i ≤ n, all the type-i satellites are working together to protect their minimal enclosing convex polyhedron (though its volume might be zero). If a point is protected by at least k kinds of satellites, we say this point is safe. Find the volume of all safe places (it might be zero). Input The first line contains T (T ≤ 25), the number of test cases. Each test case begins with three integers n,kandm(1≤k≤n≤5,4≤m≤50). Eachofthefollowingmlinescontainsanintegertandthree real numbers x, y, z, representing a type-t satellite at (x, y, z) (1 ≤ t ≤ n, 0 ≤ x, y, z ≤ 10). Each test case is terminated by a blank line Note: The coordinates of satellites in the judge input (not sample input) are randomly generated. Output For each test case, print the volume rounded to 5 decimal places after the decimal point. Sample Input 2 2 1 16 1000 1002 1020 1022 1200 1202 1220 1222 2111 2113 2131 2133 2311 2313 2331 2333 114 1000 1010 1001 1100

2/2 Sample Output 15.00000 0.16667