摘要: [模板](https://www.luogu.com.cn/problem/P5180) ``` #include #include using namespace std; const int N = 200010, M = 300010; int n, m, ans[N], head[N][3] 阅读全文
posted @ 2023-08-10 01:24 duoluoluo 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ``` #include mt19937_64 rnd(random_device{}()); uniform_int_distribution dist(0, ULLONG_MAX); long long r = dist(rnd); ``` 阅读全文
posted @ 2023-05-29 17:04 duoluoluo 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 模板 #include <cctype> #include <chrono> #include <cstdio> #include <random> #include <set> #include <vector> typedef unsigned long long ull; const ull 阅读全文
posted @ 2023-03-04 19:52 duoluoluo 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 模板 #include <iostream> #include <cstdio> using namespace std; const int MOD = 998244353; int inv2, inv6, n, a, b, c; long long quickPower (long long x 阅读全文
posted @ 2023-01-06 16:32 duoluoluo 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 连续的取点,时间复杂度O(n) 模板 #include <iostream> #include <cstdio> using namespace std; const int N = 60, MOD = 998244353; int n, k, fac[N], inv[N], pows[N][N 阅读全文
posted @ 2022-12-29 00:01 duoluoluo 阅读(19) 评论(0) 推荐(0) 编辑
摘要: inline void solve (int n) { for (int i = 1, top = 1; i <= n; i ++, top ++) { int cur = 0; for (int j = top; j <= n; j ++) if (mat[j][i]) { cur = j; br 阅读全文
posted @ 2022-10-05 11:14 duoluoluo 阅读(25) 评论(0) 推荐(0) 编辑
摘要: [模板](https://www.luogu.com.cn/problem/P4195) ```cpp #include #include #include #include using namespace std; const int HashMod = 191981; long long a, 阅读全文
posted @ 2022-09-06 19:58 duoluoluo 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 模板 #include <iostream> #include <cstdio> using namespace std; const int MAXN = 62; int n, top; long long p[65], a[65]; bool zero; inline void insert ( 阅读全文
posted @ 2022-08-31 10:46 duoluoluo 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 模板 #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int N = 1000100; int n, m, q, nex[N], pre[N], top; char s[N], t 阅读全文
posted @ 2022-08-28 23:09 duoluoluo 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 模板 #include <iostream> #include <cstdio> using namespace std; const int N = 100010; int n, c[N], head[N], ver[N << 1], nex[N << 1], tot, cnt[N], num[N 阅读全文
posted @ 2022-07-22 11:25 duoluoluo 阅读(23) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示