#P11043. [2016杭电多校]How Many Triangles

    ID: 10185 传统题 5000ms 256MiB 尝试: 2 已通过: 1 难度: 7 上传者: 标签>CF2200计算几何排序枚举数学扫描线

[2016杭电多校]How Many Triangles

How Many Triangles

Problem Description

Alice has n points in two-dimensional plane. She wants to know how many different acute triangles they can form. Two triangles are considered different if they differ in at least one point.

Input

The input contains multiple test cases. For each test case, begin with an integer n, next n lines each contains two integers xix_{i} and yiy_{i}. 3n20003 \leq n \leq 2000 0xi,yi1e90 \leq x_{i},y_{i} \leq 1e9 Any two points will not coincide.

Output

For each test case output a line contains an integer.

Sample Input

3
1 1
2 2
2 3
3
1 1
2 3
3 2
4
1 1
3 1
4 1
2 3

Sample Output

0
1
2

Author

ZSTU

Source

2016 Multi-University Training Contest 5