05 2025 档案
摘要:洛谷模板题AC通过 #include <bits/stdc++.h> using namespace std; using i64 = long long; int P; template<class Node> struct SegmentTree { #define lc u<<1 #defin
阅读全文
摘要:将佬[1]$的值域分块封装了一下,洛谷过了 template <typename T> struct Block { int B, N, tot; vector<T> cnt, Cnt, L, R, belong; Block(int n): N(n - 1), B(sqrt(n - 1)), cn
阅读全文
摘要:struct DSU { vector<int> fa, sz, st; DSU(int n) { fa.resize(n); sz.assign(n, 1); iota(fa.begin(), fa.end(), 0); } int find(int x) { return fa[x] == x
阅读全文

浙公网安备 33010602011771号