题库练习 Number of Parallelograms
← 上一题 下一题 →

A10270 | Number of Parallelograms

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

You are given $n$ points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the vertices at the given points.

输入格式

The first line of the input contains integer $n$ ( $1<=n<=2000$ ) — the number of points.

Each of the next $n$ lines contains two integers $(x_{i},y_{i})$ ( $0<=x_{i},y_{i}<=10^{9}$ ) — the coordinates of the $i$ -th point.

输出格式

Print the only integer $c$ — the number of parallelograms with the vertices at the given points.

输入输出样例

输入 #1
4
0 1
1 0
1 1
2 0
输出 #1
1
C++ 编辑器
输入
输出