上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页
摘要: 二分图最大匹配模板(匈牙利算法) P3386 【模板】二分图最大匹配 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) struct augment_path { vector<vector<int> > g; vector<int> pa; // 匹配 vector<int> pb 阅读全文
posted @ 2023-12-02 12:32 Ke_scholar 阅读(54) 评论(0) 推荐(0)
摘要: struct EulerSieve { private: int n; vector<int> phi; // 欧拉函数数组 vector<int> mu; // 莫比乌斯函数数组 vector<int> nextp; // 最小质因子数组 vector<int> prime; // 素数列表 ve 阅读全文
posted @ 2023-11-30 17:48 Ke_scholar 阅读(45) 评论(2) 推荐(0)
摘要: KEYENCE Programming Contest 2023 Autumn(AtCoder Beginner Contest 325) - AtCoder E E - Our clients, please wait a moment (atcoder.jp)(分层图最短路) 因为只能从坐公司汽 阅读全文
posted @ 2023-11-30 01:52 Ke_scholar 阅读(15) 评论(0) 推荐(0)
摘要: Codeforces Round 911 (Div. 2) D D. Small GCD 题意 定义\(f(a,b,c)\)为\(a,b,c\)中较小两个数的\(gcd\),给定数组\(a_{1...n}\),求 \[\begin{aligned} \sum\limits_{i=1}^{n}\sum 阅读全文
posted @ 2023-11-28 20:41 Ke_scholar 阅读(62) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; template <typename T> class SparseTable { using VT = vector<T>; using VVT = vector<VT>; using func_type 阅读全文
posted @ 2023-11-26 01:51 Ke_scholar 阅读(53) 评论(0) 推荐(0)
摘要: AtCoder Beginner Contest 327D D - Good Tuple Problem (atcoder.jp)(种类并查集,二分图染色) 算法学习笔记(7):种类并查集 附上典题:P1892 [BOI2003] 团伙 种类并查集做法 #include <bits/stdc++.h 阅读全文
posted @ 2023-11-26 01:48 Ke_scholar 阅读(15) 评论(0) 推荐(0)
摘要: AtCoder Beginner Contest 329 F F - Colored Ball (atcoder.jp)(启发式合并) 问题陈述 有 \(N\) 个编号为 \(1, 2, \ldots, N\) 的盒子。最初,盒子 \(i\) 中有一个颜色为 \(C_i\) 的小球。 给你\(Q\) 阅读全文
posted @ 2023-11-23 22:58 Ke_scholar 阅读(21) 评论(0) 推荐(0)
摘要: AtCoder Beginner Contest 328 A - Not Too Hard (atcoder.jp) #include <bits/stdc++.h> #define debug(a) cout<<#a<<"="<<a<<'\n'; using namespace std; usin 阅读全文
posted @ 2023-11-15 21:21 Ke_scholar 阅读(32) 评论(0) 推荐(0)
摘要: 【蓝桥杯】1024 第 2 场算法双周赛 新生【算法赛】 - 蓝桥云课 (lanqiao.cn) #include <iostream> using namespace std; int main() { printf("15"); return 0; } 铺地板【算法赛】 - 蓝桥云课 (lanq 阅读全文
posted @ 2023-11-02 13:25 Ke_scholar 阅读(41) 评论(0) 推荐(0)
摘要: //快速幂 //底数128 long long ksm(__int128 a, long long b, long long p) { __int128 res = 1; while (b) { if (b & 1)res = res * a % p; b >>= 1; a = a * a % p; 阅读全文
posted @ 2023-10-31 19:28 Ke_scholar 阅读(29) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页