12 2022 档案

摘要:题目链接 感觉比普通平衡树易懂 代码: #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 7; struct Node{ int p, s[2], mark; int v, tag, size; void init(in 阅读全文
posted @ 2022-12-22 18:57 feuerwerk 阅读(16) 评论(0) 推荐(0) 编辑
摘要:题目链接 题目要求:插入数据,删除数据,查询数的排名,查询排名为x的 数,找前驱,找后继 旋转操作,左旋和右旋,旋转x,旋转操作一定要符合先序遍历前后一致 点击查看代码 void rotate(int x){ int y = tr[x].p, z = tr[y].p; int k = tr[y] 阅读全文
posted @ 2022-12-22 18:49 feuerwerk 阅读(21) 评论(0) 推荐(0) 编辑
摘要: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 << 阅读全文
posted @ 2022-12-04 18:29 feuerwerk 阅读(14) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示