摘要: 朴素 #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 5 阅读全文
posted @ 2025-01-23 21:17 闫柏军 阅读(11) 评论(0) 推荐(0)
摘要: 前提:有向图 强连通图:任意一个点可以到达其他所有点 强连通图分量:选择一个点集S,使得S为强连通图。 阅读全文
posted @ 2024-12-29 10:19 闫柏军 阅读(8) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e7 + 20; int exgcd(int a, int b, in 阅读全文
posted @ 2024-12-28 18:57 闫柏军 阅读(16) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; void divide(int x) { for(int i=2;i<=x/i;i++) { if( 阅读全文
posted @ 2024-12-27 21:32 闫柏军 阅读(14) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; int a[120]; bool isp(int x) { if(x<2)return false; 阅读全文
posted @ 2024-12-27 21:21 闫柏军 阅读(7) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int f[1010]; int su[800];//素数表 int main() { int n = 1000; int tot = 0; f[1] = 1; for (int i = 2; i <= n; 阅读全文
posted @ 2024-12-17 13:31 闫柏军 阅读(23) 评论(0) 推荐(0)
摘要: 1 肉眼查错:逻辑正确 数组开小 long long cmp不能有等于也交换的情况 2 输出调试:打印答案 变量 数组(dp) 待补充 3 对拍:正确性 前提 : 写一份暴力 检查正确性 不常用 因为耗时因此优先用方法1,2 标程(保证对的代码) 复杂度可以很高 或 部分数据保证正确 例如树是一条链 阅读全文
posted @ 2024-12-17 13:15 闫柏军 阅读(15) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e5 + 20; vector<int>e[N]; int dep[N 阅读全文
posted @ 2024-12-02 20:39 闫柏军 阅读(13) 评论(0) 推荐(0)
摘要: CSP-J/S 游记 对于一个初三的高龄OIer 才学了一年 这次的csp也重要也不重要吧 学完了J组 S组刚刚开始系统学 因为在弱省所以初赛没练过 没划定分数线的时候还很紧张 还好晋级没问题 J组 T1 T2 比我想象中的要水 感觉学个语法都能做 T3 T4 开始想毕竟是T3 所以先打了送的60p 阅读全文
posted @ 2024-11-02 11:12 闫柏军 阅读(19) 评论(0) 推荐(0)
摘要: 高精度 加减乘除 #include <bits/stdc++.h> using namespace std; const int N = 2e3 + 10; // 定义最大数字长度 char s[N], t[N]; // 存储输入的两个大整数字符串 int a[N], b[N], c[N]; // 阅读全文
posted @ 2024-10-17 16:16 闫柏军 阅读(41) 评论(0) 推荐(0)