摘要:
代码:#include#include#include#includeusing namespace std;const int maxn = 100000 + 100;const int maxlog = 20;int a[maxn],num[maxn],Left[maxn],Right[maxn];int counts[maxn];int n,q;int segcnt;struct RMQ{ int d[maxn][maxlog]; void init() { memset(d,-0x3f,sizeof(d)); for(int i=1; i>... 阅读全文