摘要: 约数之和 #include<bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; typedef long long ll; unordered_map<int,int> mp; int main(){ int n; cin >> 阅读全文
posted @ 2025-11-12 15:40 XYu1230 阅读(5) 评论(0) 推荐(0)
摘要: 染色法判定二分图 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10, M = 2 * N; int h[N], e[M], ne[M], idx; int n, m; int color[N]; void add( 阅读全文
posted @ 2025-11-12 15:40 XYu1230 阅读(4) 评论(0) 推荐(0)
摘要: 字符串哈希 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10, P = 131; typedef unsigned long long ull; int n, m; ull p[N], h[N]; char st 阅读全文
posted @ 2025-11-12 15:40 XYu1230 阅读(3) 评论(0) 推荐(0)
摘要: 匈牙利算法(二分图的最大匹配) #include<bits/stdc++.h> using namespace std; const int N = 510, M = 100010; int h[N], e[M], ne[M], idx; int n1 , n2 ,m; int match[N]; 阅读全文
posted @ 2025-11-12 15:39 XYu1230 阅读(4) 评论(0) 推荐(0)
摘要: 约数个数 #include<bits/stdc++.h> using namespace std; const int N = 110, mod = 1e9 + 7; unordered_map<int ,int > mp; int main(){ int n; cin >> n; while(n 阅读全文
posted @ 2025-11-12 15:39 XYu1230 阅读(5) 评论(0) 推荐(0)