#include #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long #define fi first; #define se second; using namespace std; typedef pair P; signed main(){ int n, d, k; cin >> n >> d >> k; vector x(n); rep(i, 0, n){ cin >> x[i]; } int ans = -1; int l = 0, r = 0; int MAX = -1, idl = 0, idr = 0; for(l = 0; l < n; l++){ while(r - l < d && r < n - 1){ r++; if(MAX < x[r]){ MAX = x[r]; if(ans < MAX - x[l]){ idl = l; idr = r; ans = MAX - x[l]; // cout << ans << " " << l << " "<< idl << " " << r << " " << idr << endl; } } } } if(ans == -1) cout << 0 << endl; else{ cout << ans * k << endl; cout << idl << " " << idr << endl; } }