21553_Symmetry

2022-5-16 18:19| 发布者: Hocassian| 查看: 34| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505627717400-Problem List-采集的数据-后羿采集器.html

Pro.ID

21553

Title

Symmetry

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21553

AC

2

Submit

12

Ratio

16.67%

时间&空间限制

  • Time Limit: 1000/500 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    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.

    输入

    * 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 i-th cow (-10,000 ≤ x, y ≤ 10,000).

    输出

    Description

    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.

    Input

    * 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 i-th cow (-10,000 ≤ x, y ≤ 10,000).

    Output

    4
    0 0
    0 1
    1 0
    1 1

    Sample Input

    4

    Sample Output

    INPUT DETAILS:

    The 4 cows form the corners of a square.

    OUTPUT DETAILS:

    There are 4 lines of symmetry -- one vertical, one horizontal, and two diagonal.

    Source

    样例输入

    4

    样例输出

    INPUT DETAILS:

    The 4 cows form the corners of a square.

    OUTPUT DETAILS:

    There are 4 lines of symmetry -- one vertical, one horizontal, and two diagonal.

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部