| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 29 | 24 | 21 | 80.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.
5 67 1 68 1 68 1
2
3 67 67 767 677
3
2 67 67 1
1
ICPC > Regionals > North America > Pacific Northwest Regional > 2025 ICPC Pacific Northwest Regional > Division 2 B번