跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1270. Number of Parallelograms

  • ID: 1276
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:提高
  • 上传者:
  • 计算几何
  • 数学
  • 提高
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Number of Parallelograms

题目描述

D. Number of Parallelograms
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

Input

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 (xi,yi) (0≤xi,yi≤109) − the coordinates of the i-th point.

Output

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

Example
Input
4
0 1
1 0
1 1
2 0
Output
1


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 755 题。保留原作者与原赛事署名。