func_code_string: #include <bits/stdc++.h>   using namespace std;   int MOD = 1000000007;   int tree[20000][2];   int main() {     ios::sync_with_stdio(0);     int n, a, b, k;     cin >> n >> a >> b >> k;     for (int i = 1; i <= n; i++) {       if (i != b) tree[i][0]++;     }     int h = 1;     for (int j = 1; j <= k; j++) {       for (int i = 2; i <= n; i++) {         tree[i][1 - h] += tree[i - 1][1 - h];         tree[i][1 - h] %= MOD;       }       for (int i = 1; i <= n; i++) {         if (i == b) continue;         int lim = abs(i - b);         lim--;         tree[i][h] =             tree[min(n, i + lim)][1 - h] - tree[max(1, i - lim) - 1][1 - h];         tree[i][h] += MOD;         tree[i][h] %= MOD;         tree[i][h] -= (tree[i][1 - h] - tree[i - 1][1 - h] + MOD) % MOD;         tree[i][h] += MOD;         tree[i][h] %= MOD;       }       h ^= 1;     }     for (int i = 2; i <= n; i++) {       tree[i][1 - h] += tree[i - 1][1 - h];       tree[i][1 - h] %= MOD;     }     cout << (tree[a][1 - h] - tree[a - 1][1 - h] + MOD) % MOD << endl;     return 0;   }   