#aBC281E. [ABC281E] Least Elements
[ABC281E] Least Elements
AT_abc281_e [ABC281E] Least Elements
题目描述
给定一个序列 ,对于每个 ,将 从小到大排序后(不影响原序列),求出 $\displaystyle ans_i = \sum\limits_{j=i}^{i+k-1} A_j$。
输入格式
输出格式
$\mathrm{ans}_1 \mathrm{ans}_2 \cdots \mathrm{ans}_{N-M+1}$
输入输出样例 #1
输入 #1
6 4 3
3 1 4 1 5 9
输出 #1
5 6 10
输入输出样例 #2
输入 #2
10 6 3
12 2 17 11 19 8 4 3 6 20
输出 #2
21 14 15 13 13
说明/提示