#include long long x[100000]; int main(int argc, char const *argv[]){ long long n,d,k,i,c,max=0,sell,min_i,f=1; scanf("%lld %lld %lld",&n,&d,&k); for(i=0;i0){ for(c=f;c<=d;c++){ if(i-c<0) break; if(max<=x[i]-x[i-c]){ min_i=i-c; sell=i; max=x[i]-x[i-c]; } if(x[i-c]>=x[i]){ i=i-c+1; break; } } if(c==d+1) f=d; else f=1; i--; } if(max==0) printf("0\n"); else printf("%lld\n%lld %lld\n",max*k,min_i,sell); return 0; }