3D Geometry
시간 제한1초메모리 제한1024 MB
각 테스트 케이스마다 축에 정렬된 사면체와 축에 정렬된 상자의 교집합 부피를 구한다.
문제
An axis-aligned tetrahedron (also known as triangular pyramid) is a convex polyhedron in three dimension with vertices
- ,
- ,
- ,
- .
Also, an axis-aligned cube is a convex polyhedron with vertices
- ,
- ,
- ,
- ,
- ,
- ,
- ,
- .
Given an axis-aligned tetrahedron and an axis-aligned cube , find the volume of their intersection.
입력
The input consists of several test cases terminated by end-of-file. For each test case,
There are lines, and the -th line contains three integers , , and .
출력
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 .
제한
- for each
- , ,
- , ,
- In each input, the number of test cases does not exceed .