摘要: 没想到这道题竟然这么水…我们发现m,n都非常小,完全可以O(nm)O(nm)O(nm)预处理出stripe数组,即代表(i,j)(i,j)(i,j)及其向上的一列的个数,然后进行递推即可。#include#includeusing namespace std... 阅读全文
posted @ 2018-09-06 19:18 EM-LGH 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 有些细节需要注意: 1.编号和元素种类都从0开始标号。 2.需要特判一下队列被弹空的情况。 Code:#include#includeusing namespace std;const int maxn = 1000000 + 4;int typ[maxn]... 阅读全文
posted @ 2018-09-06 18:30 EM-LGH 阅读(132) 评论(0) 推荐(0) 编辑