![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数据结构----单调栈
#
夕林山寸
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #669 (Div. 2) A-E
A:思维贪心,尽量只保留0或者只保留1 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define re register #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const double PI= acos(-1.0); const int M = 1e5+7; /* int head[M],cnt=原创 2020-09-12 19:59:08 · 113 阅读 · 0 评论 -
ICPC Latin American Regional Contests 2019 L. Leverage MDT 单调栈
由于只能按行翻转,我们枚举列,就相当于求一个直方图的最大子正方形。 直方图的高度为,i行j列往右连续相同的字符个数。 (因为翻转相当于把0变成1,我们肯定是尽可能让底层为G,所以底层B就翻转) #include <bits/stdc++.h> using namespace std; typedef long long ll; #define ls (o<<1) #d...原创 2020-04-10 21:18:37 · 193 阅读 · 0 评论