func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<vector<long long> > dp;   const long long mod = 1e9 + 7;   bool used[1005][1005];   int n;   long long dfs(int opening, int closing) {     if (dp[opening][closing] != -1) return dp[opening][closing];     if (opening > n or closing >= n) return 0;     long long ans = 0;     if (opening < n) {       ans += dfs(opening + 1, closing);       if (!used[opening + 1][closing] and !used[opening][closing]) {         ans++;         used[opening][closing] = 1;       }     }     if (closing < opening) {       ans += dfs(opening, closing + 1);       if (!used[opening][closing + 1] and !used[opening][closing]) {         ans++;         used[opening][closing] = 1;       }     }     return dp[opening][closing] = ans % mod;   }   int main() {     dp = vector<vector<long long> >(1005, vector<long long>(1005, -1));     cin >> n;     cout << dfs(0, 0) << endl;   }   