There are stalls on the straight line, in which it is necessary to place the cows so that the minimum distance between the cows is as large as possible.
Input:
- numbers N
are entered in the first line (\(2 < N < 10001\)) – number of stalls, and K
(\(1 < K < N \)) – number of cows;
- the second line contains N
natural numbers in ascending order – stable coordinates (coordinates do not exceed \(10^9\)).
Output: print a single number – the largest possible distance allowed.
Examples
# |
Input |
Output |
1 |
6 3
2 5 7 11 15 20
|
9 |