#include #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define FORR(i,a,b) for (int i=(a);i>=(b);i--) #define pb push_back using namespace std; typedef long long ll; typedef pair pii; typedef vector vi; typedef set si; const int inf = 1e9; const int mod = 1e9+7; set s; int n, d, k, x[100000]; main(){ cin.tie(0); ios::sync_with_stdio(false); cin >> n >> d >> k; d++; int m[3]; m[0] = -1; FOR(i, 0, n){ cin >> x[i]; s.insert(pii(x[i], i)); if(i - d >= 0) s.erase(pii(x[i - d], i - d)); set::iterator itr = s.begin(); if(m[0] < x[i] - itr->first){ m[0] = x[i] - itr->first; m[1] = itr->second; m[2] = i; } } cout << k * m[0] << endl; if(m[0] > 0) cout << m[1] << " " << m[2] << endl; }