시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1.5 초 | 256 MB | 197 | 27 | 8 | 5.634% |
There are $n$ points in three-dimensional space. Consider the convex hull of these $n$ points.
You are given $q$ queries. Each query defines a plane in three-dimensional space. For each given plane, find the area of section of the convex hull produced by this plane.
The first line of input contains two integers $n$ and $q$, the number of points and the number of queries ($1 \le n, q \le 1000$).
Each of the next $n$ lines contains three integers $x$, $y$ and $z$: the coordinates of one of the points.
The next $q$ lines describe queries. Each of them contains four integers $a$, $b$, $c$ and $d$ which specify the plane given by the equation $a x + b y + c z + d = 0$.
It is guaranteed that the absolute values of $x$, $y$, $z$, $a$, $b$, $c$ and $d$ are not greater than $2000$.
For each query, print the answer with absolute error at most $10^{-3}$.
6 1 0 0 1 1 0 1 0 1 1 0 0 -1 1 0 -1 0 1 -1 0 0 1 0
0.500