摘要: #include <iostream> #include <string> #include <cctype> using namespace std; int main() { string aim, s; // 读取目标单词 cin >> aim; cin.ignore(); // 吃掉换行!重 阅读全文
posted @ 2026-10-22 23:52 yi_one 阅读(7) 评论(0) 推荐(0)
摘要: 占个坑,反思一下 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define fi first #define se second #define P tu 阅读全文
posted @ 2026-10-18 15:53 yi_one 阅读(14) 评论(0) 推荐(0)
摘要: https://qoj.ac/contest/2564/problem/14452 模拟,这里注意是每一秒判断一次,不是每一个视频判断一次,抱歉上来看错了。。。 如果当前x+t[i]<=T,可以直接看完,如果>T,分情况,x+t[i]<=T+k[i],说明吸引力够大,也能看完,跟前面的一样,否则那就 阅读全文
posted @ 2026-10-17 16:02 yi_one 阅读(9) 评论(0) 推荐(0)
摘要: 牛客上的不知道哪一题...... 就是在并查集的基础上求最大连通块 只需要额外添加一个统计大小的数组就行 阅读全文
posted @ 2026-10-14 16:02 yi_one 阅读(6) 评论(0) 推荐(0)
摘要: 使用kmp来实现字符串的查找并返回下标以及次数 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define fi first #define se seco 阅读全文
posted @ 2026-10-14 15:36 yi_one 阅读(11) 评论(0) 推荐(0)
摘要: 补题链接🔗:https://cpc.csgrandeur.cn/csgoj/problemset/problem?pid=1587 多进程,按照题目一步步写就行 #include <bits/stdc++.h> using namespace std; typedef long long ll; 阅读全文
posted @ 2026-10-13 15:43 yi_one 阅读(6) 评论(0) 推荐(0)
摘要: 补题链接🔗:https://cpc.csgrandeur.cn/csgoj/problemset/problem?pid=1586 简单题,不说了 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef 阅读全文
posted @ 2026-10-13 15:24 yi_one 阅读(5) 评论(0) 推荐(0)
摘要: 补题链接🔗:https://cpc.csgrandeur.cn/csgoj/problemset/problem?pid=1585 题目要求最少次数,那就在不得不用的时候再用,感觉跟之前的一道打怪兽题好像 可以用大根堆存b,当目前的余额小于0时,开始使用b,尽量用大的,因为是求最小的 #inclu 阅读全文
posted @ 2026-10-13 15:01 yi_one 阅读(5) 评论(0) 推荐(0)
摘要: 补题链接🔗:https://cpc.csgrandeur.cn/csgoj/problemset/problem?pid=1584 二分 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair 阅读全文
posted @ 2026-10-13 14:16 yi_one 阅读(8) 评论(0) 推荐(0)
摘要: 补题链接🔗https://cpc.csgrandeur.cn/csgoj/problemset/problem?pid=1583 A题其实就是环形区间长度为k的最大值,我用的前缀和 #include <bits/stdc++.h> using namespace std; typedef long 阅读全文
posted @ 2026-10-13 00:49 yi_one 阅读(6) 评论(0) 推荐(0)