Angry Cows (Silver)

Find the smallest integer blast radius R so K intervals of length 2R cover all N hay bale positions on a line.

Medium4Binary searchGreedySortingInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Bessie built a video game called "Angry Cows". The player fires cows from a slingshot into a one dimensional scene that holds hay bales at various points of a number line. A cow lands hard enough to detonate the hay bales near its landing site, and the goal is to detonate every bale.

There are NN hay bales at distinct integer positions x1,x2,,xNx_1, x_2, \ldots, x_N on the number line. A cow launched with power RR that lands at position xx creates a blast of radius RR and destroys every hay bale in the range xRx-R to x+Rx+R. A cow may land at any point of the number line, and the landing point does not have to be an integer.

You have KK cows, each with the same power RR, and RR is an integer. Find the smallest RR for which the KK cows can detonate every hay bale.

Input

The first line holds NN (1N50,0001 \le N \le 50{,}000) and KK (1K101 \le K \le 10). Each of the next NN lines holds one coordinate xix_i. Every coordinate is an integer between 00 and 1,000,000,0001{,}000{,}000{,}000 inclusive, and the coordinates are distinct.

Output

Print the smallest power RR that lets the cows detonate every hay bale.