#P7553. [COCI 2020/2021 #6] Geometrija
[COCI 2020/2021 #6] Geometrija
Description
There are non-collinear points on a plane. If two line segments and have a common point other than , then they are said to “intersect”.
Let be the set of all line segments obtained by connecting every pair of the points. Find the number of segments that do not intersect any other segment in .
Input Format
The first line contains an integer .
The next lines each contain two integers , representing the coordinates of the -th point.
Output Format
Output one integer on a single line, the number of segments that satisfy the requirement.
4
1 1
-1 1
-1 -1
1 -1
4
4
-1 -1
1 -1
0 1
0 0
6
Hint
Explanation for Sample 1
The segments that satisfy the requirement are shown in the figure:

Explanation for Sample 2
The segments that satisfy the requirement are shown in the figure:

Constraints
This problem uses bundled testdata.
| Subtask | Points | Constraints |
|---|---|---|
| No additional constraints. |
For of the testdata, , .
Notes
The score of this problem follows the original COCI setting, with a full score of .
Translated from COCI2020-2021 CONTEST #6 T4 Geometrija。
Translated by ChatGPT 5
京公网安备 11011102002149号