#include #include using namespace std; int n, d, k, x[100000] = {}, ans = 0, a = 0, b = 0; int main(){ cin >> n >> d >> k; for (int i = 0; i < n; i++){ cin >> x[i]; } for (int i = 0; i < n - 1; i++){ for (int j = i + 1; j <= min(i + d, n - 1); j++){ if (x[j] - x[i] > ans){ ans = x[j] - x[i]; a = i; b = j; } } } cout << ans * k << "\n"; if (ans > 0){ cout << a << ' ' << b; } return 0; }