摘要:
对luoguP5074oiweik上代码的注解 #include <bits/stdc++.h> using namespace std; const int N = 11; long long f[2][1 << (N + 1)], *f0, *f1; int n, m; int main() { 阅读全文
摘要:
题目链接 题目要求:插入数据,删除数据,查询数的排名,查询排名为x的 数,找前驱,找后继 旋转操作,左旋和右旋,旋转$x$,旋转操作一定要符合先序遍历前后一致 点击查看代码 void rotate(int x){ int y = tr[x].p, z = tr[y].p; int k = tr[y] 阅读全文
摘要:
P1533 可怜的狗狗 可持久化线段树的板子题目 离散化(build); 查找(find); #include<bits/stdc++.h> using namespace std; const int N = 3e5 + 7; int a[N], hs[N]; int rt[N], tl[N << 阅读全文
摘要:
P1352 题目的dfs函数与骑士🔗类似,所以去写了下 代码: #include<bits/stdc++.h> using namespace std; const int N = 6e4 + 7; int f[N][2], a[N], in[N]; int head[N], tot; struc 阅读全文