摘要:
#include<bits/stdc++.h> using namespace std; const int maxn=1e6+100; const int inf=1e9; int root,tot; int a[maxn]; int pos[maxn]; int rub[maxn]; int t 阅读全文
摘要:
待修改的数组查询第k大,简单题 #include<bits/stdc++.h> using namespace std; const int maxn=2e5+100; int a[maxn]; int u[maxn]; int n,m; struct Treap_tree { int ch[2]; 阅读全文
摘要:
如题,一开始有 nn 个小根堆,每个堆包含且仅包含一个数。接下来需要支持两种操作: 1 x y:将第 xx 个数和第 yy 个数所在的小根堆合并(若第 xx 或第 yy 个数已经被删除或第 xx 和第 yy 个数在用一个堆内,则无视此操作)。 2 x:输出第 xx 个数所在的堆最小数,并将这个最小数 阅读全文