| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 5 | 4 | 4 | 80.000% |
An axis-aligned tetrahedron (also known as triangular pyramid) $DABC$ is a convex polyhedron in three dimension with vertices
Also, an axis-aligned cube $PQRSDEFG$ is a convex polyhedron with vertices
Given an axis-aligned tetrahedron $DABC$ and an axis-aligned cube $PQRSDEFG$, find the volume of their intersection.
The input consists of several test cases terminated by end-of-file. For each test case,
There are $4$ lines, and the $i$-th line contains three integers $x_i$, $y_i$, and $z_i$.
For each test case, output a float which denotes the volume.
Your answer is considered correct if its absolute or relative error doesn't exceed $10^{-6}$.
0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 2 2 2 0 0 0 1 1 1 0 2 0 2 0 2 1 0 1 0 1 0
0.166666667 0.833333333 0.166666667