eolymp
bolt
Try our new interface for solving problems
Problems

Super minimum

Super minimum

Given $n$ numbers. For every $k$ consecutive numbers find the minimum among them. \InputFile First line contains the numbers $n$ and $k~(1 \le n \le 10^6, 1 \le k \le n)$. Second line contains $n$ integers in the range from $-32768$ to $32767$. \OutputFile For every $k$ consecutive numbers print the minimum among them.
Time limit 1 second
Memory limit 128 MiB
Input example #1
11 3
8 764 1 3 85 2 4 5 77 1 5
Output example #1
1 1 1 2 2 2 4 1 1