atcoder#ARC082C. [ARC082E] ConvexScore
[ARC082E] ConvexScore
Score : points
Problem Statement
You are given points located on a two-dimensional plane. Consider a subset of the points that forms a convex polygon. Here, we say a set of points forms a convex polygon when there exists a convex polygon with a positive area that has the same set of vertices as . All the interior angles of the polygon must be strictly less than .
For example, in the figure above, {} and {} form convex polygons; {}, {}, {}, {} and {} do not.
For a given set , let be the number of the points among the points that are inside the convex hull of (including the boundary and vertices). Then, we will define the score of as .
Compute the scores of all possible sets that form convex polygons, and find the sum of all those scores.
However, since the sum can be extremely large, print the sum modulo .
Constraints
- If , or .
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the sum of all the scores modulo .
4
0 0
0 1
1 0
1 1
5
We have five possible sets as , four sets that form triangles and one set that forms a square. Each of them has a score of , so the answer is .
5
0 0
0 1
0 2
0 3
1 1
11
We have three "triangles" with a score of each, two "triangles" with a score of each, and one "triangle" with a score of . Thus, the answer is .
1
3141 2718
0
There are no possible set as , so the answer is .