A straight monitoring rail has n pre-drilled mounting positions at distinct integer coordinates. You must install k sensors, each on a distinct mounting position. To reduce interference you want the sensors spread out: maximize the smallest distance between any two of the chosen positions.
Report that largest achievable minimum distance.
Input format
Line 1: two integers n and k.
Line 2: n space-separated distinct integers, the mounting coordinates (in any order).
Output format
A single integer: the maximum possible value of the minimum pairwise distance among the chosen positions.
Constraints
- 2 <= k <= n <= 40
- 0 <= each coordinate <= 1000000
- all coordinates are distinct