8433: Symmetry

内存限制:128 MB 时间限制:1 S
题面:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

After taking a modern art class, Farmer John has become interested in finding geometric patterns in everything around his farm. He carefully plots the locations of his N cows (2 <= N <= 1000), each one occupying a distinct point in the 2D plane, and he wonders how many different lines of symmetry exist for this set of points. A line of symmetry, of course, is a line across which the points on both sides are mirror images of each-other.

Please help FJ answer this most pressing geometric question.

上完现代美术课后,农夫约翰开始对在农场周围的所有地方寻找几何图案感兴趣。



他仔细绘制了他的 N 头奶牛的位置,每头奶牛在二维平面上占据一个不同的点。



他想知道这组点共有多少条不同的对称线。



对称线是指满足线两边的点互为镜像的一条直线。



输入格式

* Line 1: The single integer N.

* Lines 2..1+N: Line i+1 contains two space-separated integers representing the x and y coordinates of the ith cow (-10,000 <= x,y <= 10,000).

第一行包含整数 N。



接下来 N 行,每行包含两个整数,表示一头牛的位置坐标 (x,y)。

输出格式

* Line 1: The number of different lines of symmetry of the point set.

输出不同对称线的数量。

输入样例 复制

4 
0 0 
0 1 
1 0 
1 1 

输出样例 复制

4 

数据范围与提示

数据范围

2≤N≤1000,

−10000≤x,y≤10000

四头牛的位置位于一个正方形的四个顶点上。



共有 4 条对称线,一条水平、一条垂直、两条对角线。