![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
洛谷
Flying_Fatty
这个作者很懒,什么都没留下…
展开
-
求和 - 洛谷P2671 - 数据维护 - dp
#include <bits/stdc++.h>using namespace std;const int mod = 10007;const int maxn = 1e5 + 10;int n, m;long long a[maxn], b[maxn], num[maxn][2], sum[maxn][2], ans;long long tmp;int main(){ //freopen("input.txt", "r", stdin); scanf("%d%d", &.原创 2022-03-05 10:30:25 · 324 阅读 · 0 评论 -
单调栈 - 洛谷 P2866
#include <bits/stdc++.h>using namespace std;int n;long long st[100010], top, ans, h;int main(){ //freopen("input.txt", "r", stdin); scanf("%d", &n); st[0] = 1e9 + 10, top = ans = 0; for(int i = 1; i <= n; i++){ scanf("%lld", &.原创 2022-03-05 10:27:37 · 251 阅读 · 0 评论