func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 1000 * 1000 * 1000;   const int MOD = INF + 7;   const int XD = 100100;   int facts[XD << 1];   void calcFacts(int n) {     facts[0] = 1;     for (int i = 1; i <= n; ++i) {       facts[i] = 1LL * facts[i - 1] * i % MOD;     }   }   int exgcd(int a, int b, int &x, int &y) {     if (a == 0) {       x = 0;       y = 1;       return b;     }     int xx, yy;     int d = exgcd(b % a, a, xx, yy);     x = yy - b / a * xx;     y = xx;     return d;   }   int getInv(int n) {     int x, y;     exgcd(n, MOD, x, y);     x = (x % MOD + MOD) % MOD;     return x;   }   int cnk(int n, int k) {     return 1LL * facts[n] * getInv(facts[n - k]) % MOD * getInv(facts[k]) % MOD;   }   int main() {     int zeroes, ones, sm;     cin >> zeroes >> ones >> sm;     if (zeroes == 0) {       if (sm == 1) {         cout << ((ones == 1) ? 1 : 0);       } else {         cout << ((ones == 1) ? 0 : 1);       }       return 0;     }     if (ones == 0) {       if (sm == 1) {         cout << ((zeroes & 1) ? 0 : 1);       } else {         cout << ((zeroes & 1) ? 1 : 0);       }       return 0;     }     calcFacts(zeroes + ones);     int res = 0;     for (int pos = 0; pos <= zeroes; ++pos) {       if (sm == 0 &&           (pos % 2 == 0 && (pos < zeroes || pos == zeroes && ones > 1) ||            pos % 2 == 1 && (pos == zeroes && ones == 1))) {         res += cnk(zeroes + ones - pos - 1, ones - 1);         res %= MOD;       }       if (sm == 1 &&           (pos % 2 == 1 && (pos < zeroes || pos == zeroes && ones > 1) ||            pos % 2 == 0 && (pos == zeroes && ones == 1))) {         res += cnk(zeroes + ones - pos - 1, ones - 1);         res %= MOD;       }     }     cout << res;     return 0;   }   