#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; int main(){ ll N, D, K; cin >> N >> D >> K; vector x; rep(i,N){ ll a; cin >> a; x.push_back(a); } D++; vector mx(N,0); { vector deq(N); int s=0,t=0; rep(i,N){ while(s= 0){ mx[i-D+1] = x[deq[s]]; if(deq[s] == i-D+1) s++; } } } ll best = 0; int best_i = 0; rep(i,N){ if(mx[i]-x[i]>best){ best = mx[i]-x[i]; best_i = i; } } if(best == 0){ cout << 0 << endl; }else{ cout << best*K << endl; cout << best_i << " "; REP(i,best_i,best_i+D){ if(x[i] == mx[best_i]){ cout << i; break; } } cout << endl; } return 0; }