摘要:
原题在此 某位大佬用线段树做的 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; const int N=3e5+7; inline int read(){ i 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int sum,tree[300005],ll[300005],rank[300005],n; struct Node{ int num,val; 阅读全文
摘要:
#include<iostream> #include<cstdio> using namespace std; int a[100001]={0}; int dg_sort(int l,int r){ int mid=a[(l+r)/2]; int i=l,j=r; while(i<=j){ wh 阅读全文
摘要:
传送门 插入 xx 数 删除 xx 数(若有多个相同的数,因只删除一个) 查询 xx 数的排名(排名定义为比当前数小的数的个数 +1+1 ) 查询排名为 xx 的数 求 xx 的前驱(前驱定义为小于 xx,且最大的数) 求 xx 的后继(后继定义为大于 xx,且最小的数) #include<iost 阅读全文