摘要:
C++ code:#include <iostream>#include <cstdio>using namespace std;struct heights{ long tallest, shortest;}T[131072], Ans;int main(){ long N, Q, n, M, i, height, A, B; while(scanf("%ld%ld", &N, &Q) != -1) { n = N + 1; M = 1; while(n) { n >>= 1; M <<= 1; } for( 阅读全文