10^9的大数组显然开不了.所以也算比较裸的离散化了... 令pos[i].pp[j]表示从左到右第j个高度为i的树的位置 (pp是个vector,范围0..now-1) pos[i].num表示有几个高度为i的树 pos[i].now表示当前kill到第几个了(从0开始计数) 离散化模板get: int Bin(int key,int n,int X[]) { , r = n - ; while (l <= r) { ; if (X[m] == key) return m; ; ; } ; }…