X[0x40000]; f(i,j){ int b=1e9; while(i<=j){ if(i&1){ if(b>X[i])b=X[i]; ++i; } if(!(j&1)){ if(b>X[j])b=X[j]; --j; } i=0x20000|i>>1; j=0x20000|j>>1; } return b; } main(){ int i,j,n,d,k,b; int j0,j1; scanf("%d%d%d",&n,&d,&k); for(i=0;i