Ice-Cream
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The beach stretches along the seacoast like a narrow strip. At some points of the beach the ice cream stalls are located. One day not all the ice cream sellers come to work. Distribute the sellers among the ice-cream stalls so that the minimum distance between them is as much as possible. So they will interfere less with each other.
Input
The first line contains the number of stalls n (2 < n < 10001) and the number of ice cream sellers k (1 < k < n) at work. The second line contains n positive integers in increasing order - the coordinates of the stalls (the coordinates are not greater than 10^9).
Output
Print one number - the minimum distance between the adjacent stalls in the optimal arrangement.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 6K
Acceptance rate 41%