#P6174. [USACO16JAN] Angry Cows S

[USACO16JAN] Angry Cows S

Description

Bessie designed a new game: Angry Cows. In this game, the player launches cows, and each cow explodes on landing, detonating hay bales within a certain range. The goal of the game is to use a set of cows to detonate all the hay bales.

There are NN hay bales located at distinct positions on a number line. The position of the ii-th hay bale is xix_i. If a cow with power RR lands at position xx, she will detonate all hay bales in the range [xR,x+R][x-R, x+R].

You can now launch KK cows, each with power RR. You need to determine the minimum value of RR such that all hay bales can be detonated using KK cows.

Input Format

The first line contains two integers N,KN, K (1N5×1041 \leq N \leq 5 \times 10^4, 1K101 \leq K \leq 10).

The next NN lines each contain an integer xix_i (0xi1090 \leq x_i \leq 10^9).

Output Format

Output one integer, the minimum value of RR.

7 2
20
25
18
8
10
3
1
5

Hint

Translated by ChatGPT 5