摘要:
[模板](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] 阅读全文
摘要:
``` #include mt19937_64 rnd(random_device{}()); uniform_int_distribution dist(0, ULLONG_MAX); long long r = dist(rnd); ``` 阅读全文
摘要:
模板 #include <cctype> #include <chrono> #include <cstdio> #include <random> #include <set> #include <vector> typedef unsigned long long ull; const ull 阅读全文
摘要:
模板 #include <iostream> #include <cstdio> using namespace std; const int MOD = 998244353; int inv2, inv6, n, a, b, c; long long quickPower (long long x 阅读全文
摘要:
连续的取点,时间复杂度 模板 #include <iostream> #include <cstdio> using namespace std; const int N = 60, MOD = 998244353; int n, k, fac[N], inv[N], pows[N][N 阅读全文
摘要:
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 阅读全文
摘要:
[模板](https://www.luogu.com.cn/problem/P4195) ```cpp #include #include #include #include using namespace std; const int HashMod = 191981; long long a, 阅读全文
摘要:
模板 #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 ( 阅读全文
摘要:
模板 #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 阅读全文
摘要:
模板 #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 阅读全文