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

25787번 - Square Fishing Net 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB126675852.252%

문제

With so many activities/events being virtual these days, we are going on a virtual fishing trip!

Given the (x,y) coordinates of n points (each point represents a fish) and a square (representing a fishing net), what is the maximum fish you can catch with one try? You can place the square net anywhere but its sides must be parallel to X-axis and Y-axis. A fish is caught if it is inside or on the boundary of the net.

입력

The first input line contains two integers: s (1 ≤ s ≤ 100), indicating the length of one side of the fishing net and n (1 ≤ n ≤ 100), indicating the number of fish. Each of the next n input lines contains two integers (each between 1 and 100, inclusive) indicating the (x,y) coordinates of one fish. Assume that no two fish are at the same location.

출력

Print the maximum number of fish you can catch.

제한

예제 입력 1

3 8
2 1
2 3
5 1
5 2
3 2
4 2
10 5
11 5

예제 출력 1

6

예제 입력 2

50 2
10 5
11 5

예제 출력 2

2

힌트

출처

University > University of Central Florida > 2022 Local Programming Contest (Qualifying Round) 4번

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

출처

대학교 대회

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

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