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 阅读全文
posted @ 2025-05-25 15:49 Ke_scholar 阅读(27) 评论(0) 推荐(0)
摘要:将佬[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 阅读全文
posted @ 2025-05-23 21:24 Ke_scholar 阅读(13) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2025-05-14 17:10 Ke_scholar 阅读(19) 评论(0) 推荐(0)