#include <bits/stdc++.h>   using namespace std;   int a, b, k, t, suan, d[1100002], f[1110000];   int main() {     cin >> a >> b >> k >> t;     int shu = k * 2 * t;     d[shu] = 1;     int y = d[0];     for (int i = 1; i <= t * 2; i++) {       f[0] = y;       for (int j = 1; j <= shu * 2 + k; j++) {         f[j] = (f[j - 1] + d[j]) % 1000000007;       }       for (int j = 0; j <= k; j++) {         d[j] = f[j + k];       }       for (int j = k + 1; j <= shu * 2; j++) {         d[j] = (f[j + k] - f[j - 1 - k] + 1000000007) % 1000000007;       }     }     for (int i = shu - a + b + 1; i <= shu * 2; i++) {       suan = (suan + d[i]) % 1000000007;     }     cout << suan;     return 0;   }   