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

34796번 - Call for Problems, Round 3 다국어

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

문제

The Call for Problems for the Pacific Northwest Regional has finished, and a number of problems were proposed. The judges voted on the difficulty of each problem. The Pacific Northwest Regional this year will feature some number of problems, and one of the goals is for no two problems to be too similar in difficulty.

Specifically, if two different problems have difficulty ratings $d_i$ and $d_j,ドル then the difference between the two must be at least $t$.

Given the problems proposed, compute the maximum number of problems that can be put on the Pacific Northwest Regional.

입력

The first line contains two integers, $n$ and $t$ (1ドル \le n \le 50, 1 \le t \le 2500$).

The next line contains $n$ integers, the difficulties of the $n$ problems proposed. Each difficulty will be between 1ドル$ and 2500ドル$.

출력

Output a single integer, the maximum number of problems that can be put on the Pacific Northwest Regional.

제한

예제 입력 1

5 67
1 68 1 68 1

예제 출력 1

2

예제 입력 2

3 67
67 767 677

예제 출력 2

3

예제 입력 3

2 67
67 1

예제 출력 3

1

노트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2025 ICPC Pacific Northwest Regional > Division 2 B번

  • 문제를 만든 사람: Nick Wu
(追記) (追記ここまで)

출처

대학교 대회

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

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