摘要: 题目连接:[https://www.luogu.com.cn/problem/P2946](P2946 [USACO09MAR] Cow Frisbee Team S) AC代码: #include <bits/stdc++.h> using namespace std; # define i64 阅读全文
posted @ 2025-07-09 15:02 Frodnx 阅读(8) 评论(0) 推荐(0)
摘要: 题目连接:[https://www.luogu.com.cn/problem/P1802](P1802 5 倍经验日) 注意此题会卡longlong AC代码: #include <bits/stdc++.h> using namespace std; # define int long long 阅读全文
posted @ 2025-07-09 11:16 Frodnx 阅读(5) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; bool Mul_ = false; #define i64 long long const int N = 1e3 + 10; i64 cnt = 0; i64 numstk[N]; char opstk[N]; i 阅读全文
posted @ 2025-03-02 16:50 Frodnx 阅读(13) 评论(0) 推荐(0)
摘要: The 2024 CCPC Online Contest 补题连接:https://codeforces.com/gym/105336 D. 编码器-解码器 考虑dp,\(dp(i,j,k)\)表示 \(T\) 的子串 \(T[j,k]\)(下标 \(j\) 到下标 \(k\) )在 \(S_{i} 阅读全文
posted @ 2024-09-13 19:37 Frodnx 阅读(207) 评论(0) 推荐(0)
摘要: The 2024 Shanghai Collegiate Programming Contest 补题连接:https://codeforces.com/gym/105229 M. 不共戴天 观察样例2,注意到6个荷叶两两分成一组,共分为3组 (1,2)(3,4)(5,6) 其中对于青蛙的策略是组内 阅读全文
posted @ 2024-09-12 18:34 Frodnx 阅读(274) 评论(0) 推荐(0)
摘要: 数学知识:https://blog.sengxian.com/algorithms/linear-basis 题单:https://www.luogu.com.cn/training/11251#information 线性基用于解决最大异或和问题等 题目: J:https://codeforces 阅读全文
posted @ 2024-09-10 18:33 Frodnx 阅读(17) 评论(0) 推荐(0)
摘要: 题目: AcWing 830. 单调栈:https://www.acwing.com/problem/content/832/ 单调栈 + 并查集: AcWing 1275. 最大数:https://www.acwing.com/problem/content/1277/ B:https://cod 阅读全文
posted @ 2024-09-10 17:41 Frodnx 阅读(18) 评论(0) 推荐(0)
摘要: The 8th Hebei Collegiate Programming Contest 补题连接:https://codeforces.com/gym/105184 A. Update #include <bits/stdc++.h> using namespace std; int main() 阅读全文
posted @ 2024-09-08 00:07 Frodnx 阅读(302) 评论(0) 推荐(0)
摘要: 思路题,set有序,lower_bound(a)可以二分寻找set中最接近的大于等于它的数 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; set<int> s; for(int i = 1; i 阅读全文
posted @ 2024-09-06 19:54 Frodnx 阅读(17) 评论(0) 推荐(0)
摘要: 使用 set_intersection() 判断两个集合之间重复元素,时间复杂度最坏O(nlogn),最好O(n) #include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<s 阅读全文
posted @ 2024-09-06 17:48 Frodnx 阅读(162) 评论(0) 推荐(0)