AdvancedRating 1700
Spread the Cows
Place c cows in n stalls at the given positions so that the minimum distance between any two cows is as large as possible. Print that distance.
Input
n c, then n positions.
Output
A number.
Sample 1
Input
5 3 1 2 8 4 9
Output
3
Sample 2
Input
2 2 1 100
Output
99
Output appears here