func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1004;   int cnk[N][N] = {0};   int mod = 1000000007;   void init_cnk() {     for (int i = 0; i < N; ++i) {       cnk[i][0] = 1;       cnk[i][i] = 1;     }     for (int i = 1; i < N; ++i) {       for (int j = 1; j < N; ++j) {         cnk[i][j] = (cnk[i - 1][j - 1] + cnk[i - 1][j]) % mod;       }     }   }   int main() {     ios_base::sync_with_stdio(false);     cout.precision(10);     cout << fixed;     int k;     cin >> k;     vector<int> c(k, 0);     for (int i = 0; i < k; ++i) cin >> c[i];     init_cnk();     int n = c.size();     vector<int> res(n, 0);     res[0] = 1;     int acc = c[0];     for (int i = 1; i < n; ++i) {       int cur = c[i];       for (int j = 0; j < cur; ++j) {         res[i] += (1LL * cnk[acc - 1 + j][j] * res[i - 1]) % (1LL * mod);         res[i] %= mod;       }       acc += cur;     }     cout << res[n - 1] << endl;     return 0;   }   