提示: 欢迎访问OurACM平台。
Problem 2110 Star

Accept: 1040    Submit: 3073
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

Overpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sky. Suddenly, one of Overpower’s classmates ask him: “How many acute triangles whose inner angles are less than 90 degrees (regarding stars as points) can be found? Assuming all the stars are in the same plane”. Please help him to solve this problem.

Input

The first line of the input contains an integer T (T≤10), indicating the number of test cases.

For each test case:

The first line contains one integer n (1≤n≤100), the number of stars.

The next n lines each contains two integers x and y (0≤|x|, |y|≤1,000,000) indicate the points, all the points are distinct.

Output

For each test case, output an integer indicating the total number of different acute triangles.

Sample Input

1 3 0 0 10 0 5 1000

Sample Output

1

Source

“高教社杯”第三届福建省大学生程序设计竞赛

Submit  Back  Status  Discuss