#Q12. 「一本通 1.2 例 1」愤怒的牛

「一本通 1.2 例 1」愤怒的牛

Description

Original source: USACO 2005 Feb. Gold

Farmer John has built a cottage with nn cow stalls arranged in a straight line. The ii-th stall is located at position xix_i. However, his mm cows are very unhappy with the cottage and often attack each other. To prevent the cows from harming one another, John decides to place each cow as far away from the others as possible. In other words, he wants to maximize the minimum distance between any two cows.

The cows dislike this arrangement, and if several cows are placed in the same stall, they will fight. To avoid any harm to the cows, John decides to assign the stalls himself so that the minimum distance between any two cows is as large as possible. What is this maximum possible minimum distance?

Input Format

The first line contains two integers nn and mm, separated by a space;

The second line contains nn integers separated by spaces, representing the positions xix_i.

Output Format

Output a single integer, representing the maximum possible minimum distance.

Sample 1

Placing the cows at positions 11, 44, and 88 results in a minimum distance of 33.

5 3
1 2 8 4 9

3

Constraints & Notes

2n1052 \leq n \leq 10^5, 0xi1090 \leq x_i \leq 10^9, 2mn2 \leq m \leq n.