#include #include using namespace std; using namespace atcoder; using ll = long long; using T = pair; T op(T l, T r) { return max(l, r); } T e() { return {0, 0}; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll N, D, K; cin >> N >> D >> K; vector> v(N); for(ll i = 0; i < N; i++) { cin >> v[i].first; v[i].second = -i; } segtree S(v); ll ans = 0, l, r; for(ll i = 0; i < N; i++) { auto [val, idx] = S.prod(i, min(i + D + 1, N)); if(val - v[i].first > ans) { ans = val - v[i].first; tie(l, r) = {i, idx}; } } cout << ans * K << "\n"; if(ans) { cout << l << " " << -r << "\n"; } }