Олимпиадный тренинг

Задача 44937. Relay race


N students were invited to programming camp. Evening leisure, it was decided to spend in the form of a relay race. To conduct the relay race, it is necessary to divide all students into R teams of C people in each. According to the head of the training camp, the team will be more successful in the relay, the less the growth of students in one team will differ. 
Number of failures of the team will be the difference between the growth of the tallest and the lowest members of this team (if there is only one person in the team, then this difference is 0).
The counselors decided to form teams so that the maximum number of failures of the formed teams was minimal. While the counselors are busy resettling students in houses, help them and calculate the smallest possible value of the maximum number of failures of the formed teams.

Consider the following example. Let there be 8 people at the training camp, whose height in centimeters is 170, 205, 225, 190, 260, 130, 225, 160, and it is necessary to form two teams of three people each. Then one of the options is this:
Team 1: students with height 225, 205, 225
Team 2: students with a height of 160, 190, 170
In this case, the number of failures of the first command will be equal to 20, and the number of failures of the second — 30. The maximum number of failures will be 30, and this will be the best possible result.

Input
The first line of the input contains three natural numbers NR and C - nbsp;number of students at the training camp, number of teams and number of people in each team (1 <= R·C <= N <= 100 000). 
Next, enter N integers — the growth of each N students. The student's height is a natural number not exceeding 1,000,000,000.

Imprint
Print one number - the smallest possible value of the maximum number of failed commands.

 
Examples
# Input Output
1
8 2 3
170
205
225
190
260
130
225
160
30