• 2338 正方形计数

    时间限制 : 10000/5000 MS(Java/Others) | 内存限制 : 131072/65536 KB(Java/Others)

    提交数 : 5 | 通过数 : 0

    题目描述

    Given a set of points with integer coordinates xi, yi, i = 1...N, your program must find all the squares having each of four vertices in one of these points.

    输入要求

    Input file contains integer N followed by N pairs of integers xi yi.
    Constraints
    
    -10^4 ≤ xi, yi ≤ 10^4, 1 ≤ N ≤ 2000. All points in the input are different.

    输出要求

    Output file must contain a single integer ― number of squares found.

    输入样例

    4
    1 0
    0 1
    1 1
    0 0
    4
    -2 5
    3 7
    0 0
    5 2

    输出样例

    1
    1
    

    提示


    来源


    [ 返回顶端 ] | [ 代码提交 ] | [ 统计数据 ] | [ 历史提交 ]