摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; void solve() { LL p, q, b; scanf("%lld %lld %lld", & 阅读全文
posted @ 2022-06-26 22:02 wKingYu 阅读(85) 评论(0) 推荐(0)
摘要: 贪心 + 单调栈 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n, k; int a[N]; void solve() { cin >> n 阅读全文
posted @ 2022-06-26 18:21 wKingYu 阅读(19) 评论(0) 推荐(0)
摘要: 等价变形 + 前缀和 + 单调栈 + 二分 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n, res; int a[N]; LL s[N]; 阅读全文
posted @ 2022-06-26 15:11 wKingYu 阅读(24) 评论(0) 推荐(0)
摘要: 数论 + 贪心 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e6 + 10; int n; void solve() { cin >> n; int res = 1, 阅读全文
posted @ 2022-06-26 13:04 wKingYu 阅读(37) 评论(0) 推荐(0)