300964: CF181B. Number of Triplets

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Number of Triplets

题意翻译

题意翻译 你得到了 n个点。所有点都是不同的。 找出三分的不同组数(A、B、C)这一点B是段的中间交流AC . 三点的群被认为是无序的,即如果点B是段的中间交流AC,然后分组(A,B,C)和(C,B,A)被认为是一样的。

题目描述

You are given $ n $ points on a plane. All points are different. Find the number of different groups of three points $ (A,B,C) $ such that point $ B $ is the middle of segment $ AC $ . The groups of three points are considered unordered, that is, if point $ B $ is the middle of segment $ AC $ , then groups $ (A,B,C) $ and $ (C,B,A) $ are considered the same.

输入输出格式

输入格式


The first line contains a single integer $ n $ ( $ 3<=n<=3000 $ ) — the number of points. Next $ n $ lines contain the points. The $ i $ -th line contains coordinates of the $ i $ -th point: two space-separated integers $ x_{i},y_{i} $ ( $ -1000<=x_{i},y_{i}<=1000 $ ). It is guaranteed that all given points are different.

输出格式


Print the single number — the answer to the problem.

输入输出样例

输入样例 #1

3
1 1
2 2
3 3

输出样例 #1

1

输入样例 #2

3
0 0
-1 0
0 1

输出样例 #2

0

Input

题意翻译

题意翻译 你得到了 n个点。所有点都是不同的。 找出三分的不同组数(A、B、C)这一点B是段的中间交流AC . 三点的群被认为是无序的,即如果点B是段的中间交流AC,然后分组(A,B,C)和(C,B,A)被认为是一样的。

加入题单

算法标签: