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 N hay bales at distinct integer positions x1,x2,…,xN on the number line. A cow launched with power R that lands at position x creates a blast of radius R and destroys every hay bale in the range x−R to x+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 K cows, each with the same power R, and R is an integer. Find the smallest R for which the K cows can detonate every hay bale.