#include #include #include using namespace std; using ll = long long; #include pair op(pair a,pair b){ return max(a,b); } pair e(){ return make_pair(0,-1); } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll n,d,k; cin>>n>>d>>k; atcoder::segtree,op,e> seg(n); vector x(n); for(int i = 0;i>x[i]; seg.set(i,make_pair(x[i],-i)); } ll ans = 0; int ni,nj; for(int i = 0;i(ri,n); auto now = seg.prod(i,ri); ll p = now.first; if(p==x[i]) continue; ll can = k * (p-x[i]); if(can<=ans) continue; ans = can; ni = i; nj = -now.second; } cout<