概要: 对于维护信息具有单调性的性质或者问题可以转化为具有单调性质的模型的题,我们可以考虑用单调栈或单调队列. 技巧及注意: 技巧很多,只要能将问题转化为单调性问题,就好解决了. 当维护固定长度的单调区间,我们考虑用单调队列,如 [BZOJ]3314: [Usaco2013 Nov]Crowded Cows(单调队列) [BZOJ]1047: [HAOI2007]理想的正方形(单调队列/-二维rmq+树状数组套树状数组)(一维连续的变成二维连续区间) 单调栈维护长度时要进行及时更新,例如: [B…