Logo
(追記) (追記ここまで)

30453번 - Symmetry of Stars 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB90535719435.337%

문제

Twinkling Stars in the universe attract us, guide us, and shed numerous intuitions to us. Astronomer Dr. Kobserved twinkling stars in a dark sky. One day, he was curious of symmetry of stars. To simplify the problem, he assumed the sky is a $xy$ plane and the stars are points placed on the plane. When the set of stars $S$ and a point $p = \left(p_x, p_y \right)$ are given, symmetry of stars $S$ with respect to a point $p$ is defined as the number of points $(x, y) \in S$ such that there exists at least one point $(x', y') \in S$ which satisfies $\left( \frac{x+x'}{2}, \frac{y+y'}{2} \right) = \left(p_x, p_y\right)$. When the set of stars $S$ is given, symmetry of stars $S$ is defined as the maximum symmetry of stars $S$ with respect to any point $p$ in the whole $xy$ plane. Let’s see an example following.

In the example above, we are given a set of stars $S = \{(1,3), (3,1), (-1,2), (4,4), (1,1), (3,3)\}$. The symmetry of stars $S$ with respect to a point $p = (2,2)$ is 4ドル$ since the point $a = (1,3)$ has point $b = (3,1)$ which satisfies $\left( \frac{a_x + b_x}{2}, \frac{a_y + b_y}{2} \right) = \left( \frac{1+3}{2}, \frac{3+1}{2} \right) = \left( p_x, p_y \right) = (2, 2)$ and the point $e = (1,1)$ has point $f = (3,3)$ which satisfies $\left( \frac{e_x + f_x}{2}, \frac{e_y + f_y}{2} \right) = \left( \frac{1+3}{2}, \frac{1+3}{2} \right) = \left( p_x, p_y \right) = (2, 2)$. The symmetry of stars $S$ with respect to a point $p =(-1,2)$ is 1ドル$ since the point $c = (-1,2)$ has point $c = (-1,2)$ itself which satisfies $\left( \frac{c_x +c_x}{2}, \frac{c_y + c_y}{2} \right) = \left( \frac{-1-1}{2}, \frac{2+2}{2} \right) = \left( p_x, p_y \right) = (-1, 2)$. The symmetry of stars $S$ is 4ドル$ since the symmetry of stars $S$ with respect to the point $p = (2, 2)$ is the maximum among all the points in the $xy$ plane.

Given a list of $n$ distinct points that represent stars, write a program to output the symmetry of the given stars.

입력

Your program is to read from standard input. The input starts with a line containing one integer, $n$ (1ドル ≤ n ≤ 3,000円$), where $n$ is the number of stars. The stars are numbered from 1ドル$ to $n$. In the following $n$ lines, the $i$-th line contains two integers that represent $x$ ($-10^9 ≤ x ≤ 10^9$) and $y$ ($-10^9 ≤ y ≤ 10^9$) coordinates of the star $i,ドル repectively. Note that no two stars are in the same position.

출력

Your program is to write to standard output. Print exactly one line. The line should contain the symmetry of stars.

제한

예제 입력 1

6
1 3
3 1
-1 2
4 4
1 1
3 3

예제 출력 1

4

예제 입력 2

5
1 3
3 1
1 1
3 3
2 2

예제 출력 2

5

예제 입력 3

1
1 5

예제 출력 3

1

힌트

출처

ICPC > Regionals > Asia Pacific > Korea > Nationwide Internet Competition > Seoul Nationalwide Internet Competition 2023 K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /