AtCoder Regular Contest 173
翻译中…
Problem Statement
翻译中…
There are $N$ distinct points on a two-dimensional plane. The coordinates of the $i$-th point are $(x_i,y_i)$.
翻译中…
We want to create as many (non-degenerate) triangles as possible using these points as the vertices. Here, the same point cannot be used as a vertex of multiple triangles.
翻译中…
Find the maximum number of triangles that can be created.
翻译中…
What is a non-degenerate triangle? A non-degenerate triangle is a triangle whose three vertices are not collinear.
翻译中…
Constraints
翻译中…
$3 \leq N \leq 300$$-10^9 \leq x_i,y_i \leq 10^9$- If
$i \neq j$, then$(x_i,y_i) \neq (x_j,y_j)$ - All input values are integers.
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N
x_1 y_1
x_2 y_2
\vdots
x_{N} y_{N}
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
7
0 0
1 1
0 3
5 2
3 4
2 0
2 2
Output #1
2
For example, if we create a triangle from the first, third, and sixth points and another from the second, fourth, and fifth points, we can create two triangles.
The same point cannot be used as a vertex for multiple triangles, but the triangles may have overlapping areas.
Input #2
3
0 0
0 1000000000
0 -1000000000
Output #2
0
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。