#abc224c. C - Triangle?
C - Triangle?
Score : points
问题描述
在 平面上,我们有编号为 到 的 个点。
第 个点位于坐标 。任何两个不同的点都处于不同的位置。
找出从这 个点中选择三个点的方法数,使得用线段连接所选的点构成一个具有正面积的三角形。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
In the -plane, we have points numbered through .
Point is at the coordinates . Any two different points are at different positions.
Find the number of ways to choose three of these points so that connecting the chosen points with segments results in a triangle with a positive area.
Constraints
- All values in input are integers.
- if .
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
4
0 1
1 3
1 1
-1 -1
Sample Output 1
3
The figure below illustrates the points.
There are three ways to choose points that form a triangle: .
Sample Input 2
20
224 433
987654321 987654321
2 0
6 4
314159265 358979323
0 0
-123456789 123456789
-1000000000 1000000000
124 233
9 -6
-4 0
9 5
-7 3
333333333 -333333333
-9 -1
7 -10
-1 5
324 633
1000000000 -1000000000
20 0
Sample Output 2
1124
update @ 2024/3/10 09:50:59