Problem 03A. Aggressive Cows ≡

Author:Pavel Mesenev   Time limit:2 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

There are n stalls at distinct integer positions a0, a1, …, an − 1 on a line, and C cows. Place the cows into C distinct stalls so that the minimum distance between any two cows is as large as possible.

Output that largest possible minimum distance.

Input format

The first line contains two integers n and C. The second line contains n distinct integers a0… an − 1 — the stall positions, in arbitrary order.

Output format

Print one integer — the maximum achievable minimum distance between two cows.

Constraints

2 ≤ C ≤ n ≤ 105

0 ≤ ai ≤ 109, all ai distinct

Sample tests

No. Standard input Standard output
1
6 3
1 2 5 8 9 15
7
2
5 3
1 2 8 4 9
3
3
2 2
10 0
10

0.036s 0.012s 18