// luogu-judger-enable-o2 #include #include using namespace std; const int maxn=1e5+10; int n,m,l,r; int d[maxn][20]; int a[maxn]; void RMQ_init(int *A,int n) { for(int i=0;i0) { scanf("%d%d",&l,&r); printf("%d\n",RMQ(l-1,r-1)); } return 0; } /* 8 8 9 3 1 7 5 6 0 8 1 6 1 5 2 7 2 6 1 8 4 8 3 7 1 8 */