摘要: 唉,比赛的时候怎么都不会啊!!题解:http://blog.csdn.net/acm_cxlove/article/details/8014170划分树+二分答案:划分树可以方便的求解k-number。再利用二分答案,即区间内小于h的个数(最大为r-l+1,最小为0)。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 6 using namespace std; 7 8 #define ls rt<<1 9 阅读全文
posted @ 2012-09-24 21:36 Missa 阅读(372) 评论(0) 推荐(0) 编辑