int max = ....;
int logN = 20;//自己改,值是log2 N
int a[],F[max][logN],int log2[];
cin>>a;
log2[0] = -1;
for(1...N){
log[i] = log[i/2]+1;
F[i][0] = a[i];
}
for(int j :1...logN)
for(int i = 1;i+(1<<j)-1<=N;i++)
F[i][j] = max(F[i][j-1],F[i+(1<<j-1)][j-1]);
for(每个询问){
int s,e;
cin>>s>>e;
int tem = logN[e-s+1];// log2(e-s+1)的向下取整的值
cout<<max(f[s][tem],F[e-(1<<tem)+1][tem]);
}
科研训练
# 寒假30篇论文计划 - [] 1、SEWResnet - [] 2、Resnet - [] 3、Spikeformer - [] 4、TVConv - [] 5、