#P3827. [NOI2017] 分身术
[NOI2017] 分身术
Description
"Clone! Technique!" — Xiao P.
On a plane, there are clones of Xiao P. Define the region occupied by a set of clones as the smallest convex polygon that covers this set of clones (i.e., the convex hull). Xiao P's ability is limited: at each time step, several clones will disappear. However, before the next time step, Xiao P will use the Clone Technique to make these disappeared clones reappear at their original positions.
Xiao P wants to know the area of the region occupied by the remaining clones after the disappearances at each time step.
Constraints
- .
- No two clones share exactly the same coordinates.
- .
- The sum of over all time steps does not exceed .
- .
- Initially, the area occupied by all clones is greater than .
- Define the vertex set of the region occupied by all clones as , with . At any time step, there exist at least two clones from that have not disappeared.
| Test point ID | |||
|---|---|---|---|
Input Format
The first line contains two positive integers , denoting the initial number of clones and the total number of time steps.
The next lines each contain two integers , describing the position of the -th clone.
The next lines: on each line, the first integer indicates that clones disappear at this time step. Then there are non-negative integers , used to generate the indices of the disappearing clones.
Generation method:
Let be twice the area of the region occupied by the clones at the previous time step. Then the indices of the clones that disappear at this time step, , are: .
In particular, at the first time step we assume , i.e., the indices of the clones that disappear at the first time step, , are: .
Output Format
Output lines in the order of the time steps. Each line contains one integer: twice the area of the region occupied by the remaining clones at that time step.
6 2
-1 0
-1 -1
0 -1
1 0
0 1
0 0
3 1 3 6
2 0 1
3
2
Hint
Sample explanation:
As shown in the figure: the left figure shows the positions of the clones and the region they occupy; the middle figure shows the situation at the first time step, where the indices of the disappearing clones are . The remaining points occupy the region inside the solid lines in the figure, and twice the area is . The right figure shows the situation at the second time step, where the indices of the disappearing clones are
The remaining points occupy the region inside the solid lines in the figure.

Translated by ChatGPT 5
京公网安备 11011102002149号