摘要:
原题链接 题解 不仅要学会怎么打cf,还要学会怎么解决问题:把条件写下来,对着条件写,然后对着程序在脑海中充分模拟 code #include<bits/stdc++.h> using namespace std; char s[20005]; int main() { int t; cin>>t; 阅读全文
posted @ 2024-04-09 23:03
纯粹的
阅读(15)
评论(0)
推荐(0)
摘要:
原题链接 题解 每一个任务都有一个最小起点能力值,和通过任务后获得的能力值,我们从最小起点开始遍历,如果遍历到某一点累加的能力值+最小起点能力值够不到当前任务的最小能力值,我们把最小起点向右移动直至够到当前任务的最小能力值。 code #include<bits/stdc++.h> using na 阅读全文
posted @ 2024-04-09 21:22
纯粹的
阅读(21)
评论(0)
推荐(0)
摘要:
原题链接 题解 巧妙模拟题 1.\(n\leq 5000\) 所以可以暴力枚举k 2.把翻转的区间具象化,我们可以发现序列中值为 1 的地方覆盖了偶数个区间, 0 的地方覆盖率奇数个区间 所以我们遍历字符串的时候,在遇到的第一个0开始建立以其为左端点的区间,如果遇到 1 的区间覆盖数为奇数,那就再建 阅读全文
posted @ 2024-04-09 16:41
纯粹的
阅读(183)
评论(0)
推荐(0)
摘要:
原题链接 题解 明确每个变量的意义 code #include<bits/stdc++.h> #define ll long long using namespace std; ll a[200005]; int main() { ll t; cin>>t; while(t--) { map<ll, 阅读全文
posted @ 2024-04-09 15:00
纯粹的
阅读(64)
评论(0)
推荐(0)

浙公网安备 33010602011771号