摘要:
双指针并非要满足单调性才可以用,他也可以维护滑动窗口 #include<iostream> #include<algorithm> using namespace std; const int N = 100010; int n, d, k; #define PII pair<int, int> # 阅读全文
摘要:
找长度为k的窗口中的最大值(单调减队列),最小值(单调增队列) #include<iostream> using namespace std; const int N = 1000010; int n, k; int a[N]; int q[N], hh = -1, tt = 0; int main 阅读全文