Rolling Variance
题号:NC52818
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

Bobo learnt that the *variance* of a sequence is

where


Bobo has a sequence ,
and he would like to find the *variance* of each consecutive subsequences of length m.
Formally, the i-th () rolling variance r_i is the *variance* of sequence .

输入描述:

The input contains at most 30 sets. For each set:
The first line contains 2 integers n, m .
The second line contains n integers ().

输出描述:

For each set, (n - m + 1) lines with floating numbers .
Your answer will be considered correct if its absolute or relative error does not exceed .
示例1

输入

复制
3 2
1 3 2

输出

复制
1.41421356
0.70710678
示例2

输入

复制
5 3
1 3 2 4 5

输出

复制
1.00000000
1.00000000
1.52752523