func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 5010, mod = 1LL * 1000 * 1000 * 1000 + 7;   long long dp[N][N], inv_fact[N], fact[N], n, k;   long long Pow(long long a, long long b) {     return b ? (b & 1 ? a : 1) % mod * Pow(a * a % mod, b >> 1) % mod : 1;   }   int C(int r, int n) {     if (r > n) return 0;     int num = 1;     for (int i = n; i >= n - r + 1; i--) num = 1LL * num * i % mod;     num = 1LL * num * inv_fact[r] % mod;     return num;   }   int main() {     ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);     fact[0] = 1;     for (int i = 1; i < N; i++) fact[i] = 1LL * fact[i - 1] * i % mod;     inv_fact[N - 1] = Pow(fact[N - 1], mod - 2);     for (int i = N - 2; i >= 0; i--)       inv_fact[i] = 1LL * inv_fact[i + 1] * (i + 1) % mod;     for (int i = 1; i < N; i++) dp[1][i] = 1;     for (int i = 2; i < N; i++)       for (int j = i; j < N; j++)         dp[i][j] = 1LL * (dp[i - 1][j - 1] + dp[i][j - 1]) % mod * i % mod;     cin >> n >> k;     long long ans = 0;     for (int r = 1; r <= min(k, n); r++) {       long long t = Pow(2, n - r);       t = 1LL * t * dp[r][k] % mod;       t = 1LL * t * C(r, n) % mod;       ans = (1LL * ans + t) % mod;     }     cout << ans <<   n ;     return 0;   }   