文件名称:slidingwindows
介绍说明--下载内容来自于网络,使用问题请自行百度
Input
The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line.
Output
There are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values.
Sample Input
8 3
1 3 -1 -3 5 3 6 7
Sample Output
-1 -3 -3 -3 3 3
3 3 5 5 6 7-Input The input consists of two lines. The f irst line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line. Output T here are two lines in the output. The first line g ives the minimum values in the window at each pos ition, from left to right, respectively. The second line gives the maximu m values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Out put -1 -3 -3 -3 3 3 3 3 5 5 6 7
The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line.
Output
There are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values.
Sample Input
8 3
1 3 -1 -3 5 3 6 7
Sample Output
-1 -3 -3 -3 3 3
3 3 5 5 6 7-Input The input consists of two lines. The f irst line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line. Output T here are two lines in the output. The first line g ives the minimum values in the window at each pos ition, from left to right, respectively. The second line gives the maximu m values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Out put -1 -3 -3 -3 3 3 3 3 5 5 6 7
(系统自动生成,下载前可以参看下载内容)
下载文件列表
新建 文本文档.txt
www.dssz.com.txt
www.dssz.com.txt
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。