F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Counting Triangles

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 414    Accepted Submission(s): 16


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
 

Author
lemon
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 18:28:38, Gzip enabled