#403
Unrated
Convention
시간 제한
2s
메모리 제한
1024MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Farmer John is hosting a new bovine grass-eating convention at his farm!

Cows from all over the world are arriving at the local airport to attend the convention and eat grass. Specifically, there are NN cows arriving at the airport (1N1051 \leq N \leq 10^5) and cow ii arrives at time tit_i (0ti1090 \leq t_i \leq 10^9). Farmer John has arranged MM (1M1051 \leq M \leq 10^5) buses to transport the cows from the airport. Each bus can hold up to CC cows in it (1CN1 \leq C \leq N). Farmer John is waiting with the buses at the airport and would like to assign the arriving cows to the buses. A bus can leave at the time when the last cow on it arrives. Farmer John wants to be a good host and so does not want to keep the arriving cows waiting at the airport too long. What is the smallest possible value of the maximum waiting time of any one arriving cow if Farmer John coordinates his buses optimally? A cow’s waiting time is the difference between her arrival time and the departure of her assigned bus.

It is guaranteed that MCNMC \geq N.

입력

The first line contains three space separated integers NN, MM, and CC. The next line contains NN space separated integers representing the arrival time of each cow.

출력

Please write one line containing the optimal minimum maximum waiting time for any one arriving cow.

예제 입력 1

6 3 2
1 1 10 14 4 3

예제 출력 1

4
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.