登录
首页 » Visual C++ » sliding

sliding

于 2011-04-03 发布 文件大小:1KB
0 92
下载积分: 1 下载次数: 0

代码说明:

说明:  求出sliding window的最大最小值(n array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves rightwards by one position. Following is an example: The array is [1 3-1-3 5 3 6 7], and k is 3. Window position Minimum value Maximum value [1 3 -1]-3 5 3 6 7 -1 3 1 [3 -1 -3] 5 3 6 7 -3 3 1 3 [-1 -3 5] 3 6 7 -3 5 1 3 -1 [-3 5 3] 6 7 -3 5 1 3 -1 -3 [5 3 6] 7 3 6 1 3 -1 -3 5 [3 6 7] 3 7 Your task is to determine the maximum and minimum values in the sliding window at each position. )

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Bresenham-UPDATE
    基于Bresenham算法的四步画直线算法,加快画直线速度(draw line based Bresenham update alogrith)
    2013-08-28 11:35:17下载
    积分:1
  • 0803248_AI
    有AI比较控制的一个小程序, 用MATLAB的rule实现的AI比较。(AI car function. use MatLab to get the AI rules)
    2011-05-08 18:54:23下载
    积分:1
  • SGA
    简单遗传算的代码,也不是我自己写的,但是我亲自调过能用的(Simple genetic algorithm code, not my own writing, but I personally emphasized the use of)
    2014-12-01 23:38:33下载
    积分:1
  • VC-generated-excel-histogram
    vc6.0 excel2003 用c++生成excel表格并且绘制柱状图 一步完成不需要操作excel(vc6.0 excel2003 c++ excel spreadsheet to generate and draw a histogram step does not need to operate excel)
    2013-05-17 15:57:41下载
    积分:1
  • MatlabSimulink_and_vc
    matlab与VC很不错的。肯定不少人需要吧。(matlab with the VC is very good. Certainly a lot of people need it.)
    2007-11-21 21:04:44下载
    积分:1
  • CloseScreenAndLock
    锁定显示器时自动关闭计算机屏幕,节约能源(Automatic shutdown the computer lock screen display, energy saving)
    2013-03-18 15:21:59下载
    积分:1
  • uu
    说明:  求解矩阵的特征值和特征向量的C++源代码,经过测试的( Solving the eigenvalues and eigenvectors of C++ source code, tested, and download the compiler can use)
    2014-12-31 14:44:04下载
    积分:1
  • DWT1D
    C语言实现一维离散小波变换,通过mallat算法实现对一维信号的快速重构和分解。(C language implementation of a one-dimensional discrete wavelet transform, fast algorithm by mallat one-dimensional signal reconstruction and decomposition.)
    2021-01-02 16:48:57下载
    积分:1
  • MFCVLC
    用VLC 控件播放视频的 VC源码。。。。 一个VLC控件范例。(Play video using VLC control VC source. . . . Example of a VLC control.)
    2010-08-05 12:40:26下载
    积分:1
  • LCDchuanxing(h)
    基于MSP430的LCD显示程序,是串行方式的,可在LCD上显示任意字符串。(Based on MSP430 LCD display program, it is a serial mode, can be displayed on LCD and the arbitrary string. )
    2013-04-23 17:14:28下载
    积分:1
  • 696524资源总数
  • 103833会员总数
  • 52今日下载