洛谷 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
相關文章
相關標籤/搜索