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

32837번 - Square Stamping 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB57242156.757%

문제

In the plane, there are $n$ points whose $y$-coordinates are either $-9999,ドル 0ドル,ドル or 9999ドル$. Let $P$ be the set of these $n$ points. Your task is to enclose all the points in $P$ by a minimum number of congruent axis-parallel squares of side length 10ドル,000円$. As a subset of the plane, each such square consists of all points inside and on the boundary.

입력

Your program is to read from standard input. The input starts with a line consisting of a single integer $n$ (1ドル ≤ n ≤ 300,000円$), representing the number of input points in $P$. In each of the following $n$ lines, there are two integers $x$ and $y,ドル representing the $x$- and $y$-coordinates of a point in $P,ドル respectively, such that it holds that $-10^9 ≤ x ≤ 10^9$ and $y \in \{-9999, 0, 9999\}$. You may assume that all the $n$ input points are distinct.

출력

Your program is to write to standard output. Print exactly one line. The line should consist of a single integer that represents the minimum possible number $t$ such that there exist $t$ axis-parallel squares of side length 10ドル,000円$ whose union encloses all the input points in $P$.

제한

예제 입력 1

5
0 9999
0 0
0 -9999
200 0
10000 9999

예제 출력 1

2

예제 입력 2

5
10 -9999
0 0
3 9999
9000 -9999
10003 9999

예제 출력 2

2

예제 입력 3

6
10 -9999
0 0
3 9999
9000 -9999
10003 -9999
10003 9999

예제 출력 3

3

힌트

출처

ICPC > Regionals > Asia Pacific > Korea > 2024 ICPC Asia Seoul Regional I번

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

출처

대학교 대회

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

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