src2020/1662_pailie/doc/Readme.md

28 lines
622 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 【东莞中学2013暑假训练题】Window
题目描述
  给你一个长度为N的数组一个长为K的滑动的窗体从最左移至最右端你只能见到窗口的K个数每次窗体向右移动一位如下表
  
  你的任务是找出窗口在各位置时的max valuemin value。
输入输出格式
输入格式:
  第1行nk。
  第2行长度为n的数组。
输出格式:
  2行第1行每个位置的min value,第2行每个位置的max value。
输入输出样例
输入样例#1
8 3
1 3 -1 -3 5 3 6 7
输出样例#1
-1 -3 -3 -3 3 3
3 3 5 5 6 7
提示信息
  数据范围:
  20% n<=500
  50%: n<=100000
  100%: n<=1000000。