[ACM] poj 2823 Sliding Window(单调队列)
2020-12-02 08:33
标签:单调队列 Description Your task is to determine the maximum and minimum values in the sliding window at each position.
Input Output Sample Input Sample Output Source 解题思路: 被单调队列搞得头痛欲裂,这里不解释了。 代码: [ACM] poj 2823 Sliding Window(单调队列),搜素材,soscw.com [ACM] poj 2823 Sliding Window(单调队列) 标签:单调队列 原文地址:http://blog.csdn.net/sr_19930829/article/details/24838167
Time Limit: 12000MS
Memory Limit: 65536K
Total Submissions: 36212
Accepted: 10723
Case Time Limit: 5000MS
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
8 3
1 3 -1 -3 5 3 6 7
-1 -3 -3 -3 3 3
3 3 5 5 6 7
#include
文章标题:[ACM] poj 2823 Sliding Window(单调队列)
文章链接:http://soscw.com/essay/23230.html