#P16320. [ICPC 2023 Jinan R] 近似凸多边形
[ICPC 2023 Jinan R] 近似凸多边形
Problem Description
This is a story about Kevin, who is a friend of Xiaoqingyu.
Kevin is the chief judge of the International Convex Polygon Contest (ICPC). He prepared a geometry problem for the contest. However, because he is not familiar with computational geometry, he cannot generate correct convex polygons as the testdata for this problem.
So Kevin feels upset. His good friend Xiaoqingyu comforts him like this: “Although the data you generate are not convex polygons, you can call them approximate convex polygons!”
You are given a set of points on the 2D plane (containing at least points). The coordinates of any two points are different, and no three points are collinear. Xiaoqingyu calls a polygon an approximate convex polygon if and only if:
- Polygon is a simple polygon. That is, all vertices of the polygon are pairwise distinct, and no two edges share any common point except that adjacent edges share a common endpoint.
- The vertices of the polygon belong to , and every point in is either inside the polygon or on the boundary of the polygon.
Let be the set of all approximate convex polygons. It can be proven that is finite and non-empty. Therefore, there exists a polygon such that is the minimum among all polygons in (where is the number of vertices of polygon ).
Kevin and Xiaoqingyu want you to compute the number of polygons satisfying .
Input Format
Each test file contains only one test case.
The first line contains an integer (), denoting the number of points in set .
For the next lines, the -th line contains two integers and (), denoting a point in set .
It is guaranteed that the coordinates of any two points in are different, and no three points are collinear.
Output Format
Output one line with one integer, denoting the number of polygons .
7
1 4
4 0
2 3
3 1
3 5
0 0
2 4
9
5
4 0
0 0
2 1
3 3
3 1
5
3
0 0
3 0
0 3
1
Hint
For the first sample, . All polygons are shown below.
:::align{center}
:::
For the second sample, . All polygons are shown below.
:::align{center}
:::
Translated by ChatGPT 5