第一次写单调队列太垃圾。。。 左右各扫一遍即可。 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define N 50010 using namespace std; str...