计算一共存在多少个三角形的问题,采用C语言编程开发的程序编写的思路的实现?

Problem Description
There are many different points int xoy coordinate axes. Connect every two points with straight line. How many triangles can you find.

Input
There are many test cases. Please process to end of file. First of each test case is an integer N (3 <= N <= 1000). Then N line follows, each line contains one unique point X, Y (-10000000 <= X, Y <= 10000000).

Output
Print the number of triangles you can find.

Sample Input
3
0 0
1 1
2 2
3
0 0
1 0
1 1

Sample Output
0
1

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐