LearnPy Hub
← Arena
AdvancedRating 1900

Shrink the Biggest Gap

Stations stand at the given increasing positions. Add k new stations anywhere so that the largest gap between neighbouring stations is as small as possible. Print that gap rounded to 6 decimal places.

Input

n and k, then n positions.

Output

One number.

Sample 1

Input
10 9
1 2 3 4 5 6 7 8 9 10
Output
0.500000

Sample 2

Input
10 1
23 24 36 39 46 56 57 65 84 98
Output
14.000000
solution.py
Output appears here
Shrink the Biggest Gap · Python Arena problem · LearnPy Hub