410471: GYM104024 C Array Brush
Description
Given an array, it's easy to calculate its maximum value $$$A$$$ and minimum value $$$B$$$. We then define variation range $$$V$$$ of an array as $$$V = A - B$$$. Now zyw has an integer array $$$a_1, a_2, ... , a_n$$$ and an array brush with length $$$k$$$. The array brush can convert exact $$$k$$$ consecutive numbers in the array into their average. Zyw only has one chance to use the array brush and he wants to minimize the variation range of the array. Can you tell him the minimum variation range?
InputThere are two lines in the input.
The first line contains two integers $$$n, k\ (1 \leq n \leq 10^5, 1 \leq k \leq n)$$$, represents the length of the array and the array brush.
The second line contains $$$n$$$ integers $$$a_1, a_2, ... , a_n\ (-10^5 \leq a_i \leq 10^5)$$$, represents the original array.
OutputOutput one real number $$$V$$$, represents the minimum variation range zyw can get. Your answer should have an absolute or relative error of at most $$$10^{-4}$$$.
ExamplesInput5 3 2 3 1 4 5Output
1.333333Input
5 2 2 3 1 4 5Output
3.000000Note
In the first sample, zyw performs array brush on $$$[1, 4, 5]$$$ and the array becomes $$$[2, 3, 3.3333, 3.3333, 3.3333]$$$, the variation range is $$$1.3333$$$.