Consider the variance of the sequence a[1]
, a[2]
, ..., a[n]
as
where
Consider the K-variance as the variance of the consecutive subsequence of length k.
Your task is to calculate all (n - k + 1) K-variances for the given sequence and k.
Formally, the i-th (1 ≤ i ≤ n - k + 1) K-variance r[i]
is the variance of sequence {a[i]
, a[i+1]
, ..., a[i+k-1]
}.
The first line contains 2 integers n, m (2 ≤ m ≤ n ≤ 10^5
).The second line of the input contains n integers a[1]
, a[2]
, ..., a[n]
(|a[i]
| ≤ 100).
Print (n - k + 1) lines with floating numbers r[1]
, r[2]
, ..., r[n-k+1]
.
Your answer will be considered correct if its absolute or relative error does not exceed 10^(-4)
.