How Many Triangles

Time Limit: 5000ms
Memory Limit: 65536KB
This problem will be judged on HDU. Original ID: 5784
64-bit integer IO format: %I64d      Java class name: Main

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 $x_{i}$ and $y_{i}$.
$3 \leq n \leq 2000$
$0 \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

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .