摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4217经典的线段树问题,找第k小数。注意sum用__int64View Code #include <stdio.h>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn=300000;int tree[maxn<<2];int temp;void build(int l,int r,int rt){ tree[rt]=r-l+1; if(l==r) return; int m=(l+r)& 阅读全文