洛谷 3871 [TJOI2010]中位数

【题解】     平衡树模板题,不过因为可以离线,所以有别的做法。把询问倒着做,变成删掉数字、求中位数,于是可以二分+树状数组。 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #define LL long long 5 #define rg register 6 #define N 500010 7 u
相关文章
相关标签/搜索