Description
There are clones of Little P on the plane. Define the area occupied by a group of instances as the smallest convex polygon that covers this group of instances. Little P has limited abilities, and some clones will disappear every moment. But before the next moment, Little P will use the magic technique to make these disappeared clones reappear in their original positions.
Given queries, after each moment when the clone disappears, what is the area occupied by the remaining clone?
Input Specification
The first line of input contains two positive integers , describing the number of clones at the beginning and the total number of quries.
The next line, the line has two integers , describing the position of the th clone.
In the next lines, the first integer in each line indicates that clones have disappeared at this moment. Next there are non-negative integers , which are used to generate the numbers of the disappeared clones.
Generated as follows:
Assume twice the area occupied by the avatar at the previous moment is . Then the numbers of the clones that disappeared at this moment are: .
In particular, at the first moment, we believe that in the previous moment, that is: the numbers of the clones that disappeared at the first moment are: .
Output Specification
Output the lines sequentially in the order of the given time, each line is an integer, representing twice the area occupied by the remaining clones at that time.
Sample Input
6 2
-1 0
-1 -1
0 -1
1 0
0 1
0 0
3 1 3 6
2 0 1
Sample Output
3
2
Explanation for Sample Output
As shown in the figure below: the left picture shows the positions of the input clones and the area they occupy; the middle picture shows the situation at the first moment, the numbers of the disappeared clones are and respectively, and the remaining points occupy the inner area of the solid line in the picture, which is twice the area of ; the right picture shows the situation at the second moment, and the numbers of the disappeared clones are respectively
The remaining points occupy the area inside the solid line in the graph.
Constraints
For all data, it is guaranteed that:
- ;
- No two clones have exactly the same coordinates;
- ;
- The sum of at all times does not exceed ;
- ;
- Initially, all clones occupy an area greater than ;
- The set of vertices defining the region occupied by all clones is , . At any moment, there are at least two undisappeared clones in .
Test Case | |||
---|---|---|---|
Comments