摘要:
#include#include#define N 1100000int a[N];int fmin[N],fmax[N];int tmin[N],tmax[N];int dicmax(int l,int r,int f[],int k) { int mid; while(l=f[mid])//... 阅读全文
摘要:
#include#define N 1100000int minf[N],maxf[N],a[N],index[N];int main() {int n,i,k,first,end;while(scanf("%d%d",&n,&k)!=EOF) {first=end=0; for(i=0;iinde... 阅读全文