02 2023 档案
摘要:constexpr int N = 100005; // ch[i][0] 代表左儿子,ch[i][1] 代表右儿子 int rt, tot, fa[N], ch[N][2], val[N], cnt[N], sz[N]; struct Splay { void maintain(int x) {
阅读全文
摘要:using ll = __int128; template <typename T> inline void rd(T &data) { T x = 0, flag = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch=='-
阅读全文