随笔分类 -  单调队列or单调队列

摘要:https://codeforces.com/contest/1506/problem/G 用单调栈维护拿的字母即可 const int maxn = 1e3 + 7; int n, t, m, cnt[300]; string s; void solve() { cin >> t; while ( 阅读全文
posted @ 2021-08-17 19:37 naymi 阅读(39) 评论(0) 推荐(0)
摘要:https://codeforces.com/contest/1313/problem/C2 单调栈维护下每个位置向前向后单调的最大和 const int maxn = 5e5 + 7; #define int long long int n, t, m; int a[maxn], pre[maxn 阅读全文
posted @ 2021-08-06 21:31 naymi 阅读(22) 评论(0) 推荐(0)