摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2665在线询问静态区间k大去学主席树,没看懂;学树套树,没看懂;最后划分树拯救了我,orz......划分树讲解看百度百科#include #include using namespace std ;int tree[30][100005] ;int toleft[30][100005] ;int sorted[100005] ; void build(int l,int r,int dep){ if(l==r)return ; int m=(l+r)>>1 ; int same=m-l+1... 阅读全文