摘要:
using i128 = __int128; istream &operator>>(istream &is, i128 &x) { string s; is >> s; bool neg = false; x = 0; for (char c : s) { if (c == '-') neg = 阅读全文
摘要:
template<class Node> struct PersidentSegmentTree { #define lc(u) tr[u].l #define rc(u) tr[u].r const int n; int tot = 0; vector<Node> tr; vector<int> 阅读全文
摘要:
【线段树合并/树上差分】P4556 [Vani有约会] 雨天的尾巴 /【模板】线段树合并 思路 对 \(x,y,lca(u,v),fa_{lca(u,v)}\) 四个点进行树上差分,然后用线段树合并动态权值线段树。 #include <bits/stdc++.h> using namespace s 阅读全文