Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#define mod 1e9+7
long long exgcd(long long a, long long b, long long &x, long long &y) 
{
    if (b == 0) 
	{
        x = 1;
        y = 0;
        return a;   
    }
    long long d = exgcd(b, a % b, y, x);
    y -= a / b * x;
    return d;
}
long long inv(long long	 a, long long  MOD) 
{
    long long x, y;
    exgcd(a, MOD, x, y);
    x = (x % MOD + MOD) % MOD;
    return x;
}
long long fac[200010];
long long  lucas(long long n, long long  m) 
{
    long long ret = 1, a, b;
    while (n && m) 
	{
        a = n % mod, b = m % mod;
        if (a < b) return 0;
        ret = ret * fac[a] % mod * inv(fac[b] * fac[a - b] % mod, mod) % mod;
        n /= mod, m /= mod;
    }
    return ret;
}
int main()
{
    long long  x, y, n, m;
    scanf("%lld%lld%lld%lld", &n, &m, &x, &y);
    long long ans = 0;
    fac[0] = 1;
    for (int i = 1; i <= 200005; i++) 
		fac[i] = fac[i - 1] * i % mod;
    long long z = y, p = n + m - 2;
    for (long long i = 0; i <= n - x - 1; i++) 
	{
        ans = ans + lucas(z + i - 1, i) * lucas(p - z - i, n - 1 - i) % mod;
        ans %= mod;
    }
    printf("%lld\n", ans);
}

Compiler output:
a.cc: In function 'long long int lucas(long long int, long long int)':
a.cc:30:15: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   30 |         a = n % mod, b = m % mod;
      |             ~ ^
      |             |
      |             long long int
a.cc:30:28: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   30 |         a = n % mod, b = m % mod;
      |                          ~ ^
      |                          |
      |                          long long int
a.cc:32:28: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   32 |         ret = ret * fac[a] % mod * inv(fac[b] * fac[a - b] % mod, mod) % mod;
      |               ~~~~~~~~~~~~ ^
      |                   |
      |                   long long int
a.cc:32:60: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   32 |         ret = ret * fac[a] % mod * inv(fac[b] * fac[a - b] % mod, mod) % mod;
      |                                        ~~~~~~~~~~~~~~~~~~~ ^
      |                                               |
      |                                               long long int
a.cc: In function 'int main()':
a.cc:44:41: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   44 |                 fac[i] = fac[i - 1] * i % mod;
      |                          ~~~~~~~~~~~~~~ ^
      |                                     |
      |                                     long long int
a.cc:48:71: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   48 |         ans = ans + lucas(z + i - 1, i) * lucas(p - z - i, n - 1 - i) % mod;
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      |                                         |
      |                                         long long int
a.cc:49:13: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   49 |         ans %= mod;
      |             ^
a.cc:49:13: note:   in evaluation of 'operator%=(long long int, double)'