摘要:
字符串 Trie 01Trie template<int BIT = 31> class C_Trie { private: int root, cnt; vector<int>siz; vector<vector<int>>trie; public: void Init(int sigma_n) 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(88)
评论(0)
推荐(0)
摘要:
图论 存储 class C_Graph { public: struct Edge { int u, v, w; Edge(int _u = 0, int _v = 0, int _w = 0) { u = _u, v = _v, w = _w; } friend bool operator<(co 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(107)
评论(0)
推荐(1)
摘要:
数学 逆元 离线法 class C_INV { private: int Pow(int a, lnt b, int P) { int res = 1; while (b) { if (b & 1) { res = (1ll * res * a) % P; } b >>= 1, a = (1ll * 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(106)
评论(0)
推荐(0)
摘要:
数据类型 大数类 struct Bigint { int sign; string digits; /* */ Bigint(void) {} Bigint(string b) { (*this) = b; } Bigint(int b) { (*this) = to_string(b); } /* 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(64)
评论(0)
推荐(0)
摘要:
树论 LCT class C_LinkCutTree { public: int rev[N], fa[N], ch[N][2]; /* */ bool Which(int x) { return ch[fa[x]][1] == x; } bool IsRoot(int x) { return ch 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(50)
评论(0)
推荐(0)
摘要:
读写 __int128 ostream& operator<<(ostream& output, __int128 integer) { if (integer < 0) { output << '-'; integer *= -1; } string str; do { str.push_back 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(35)
评论(0)
推荐(0)
摘要:
编译 #include<bits/stdc++.h> using namespace std; /* */ #define endl '\n' /* */ using lnt = long long; /* */ void Solve(void) { } /* */ int main() { #if 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(52)
评论(0)
推荐(0)
摘要:
数据结构 莫队 int n, m; /* */ int S; struct Query { int l, r, idx; Query(int _l = 0, int _r = 0, int _idx = 0) { l = _l, r = _r, idx = _idx; } friend bool o 阅读全文
posted @ 2025-02-19 22:32
ProtectEMmm
阅读(75)
评论(0)
推荐(0)

浙公网安备 33010602011771号