criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
signed main(){
  int a,b,c,d;
  long long f;
  cin>>a>>b>>c>>d;
  vector<vector<int>> e(a,vector<int>(b,0));
  fo(i,a){
    if(i<a-c)
      e[i][0]=1;
  }
  fo(i,b)
    e[0][i]=1;
  for(int i=1;i<a;i++){
    for(int j=1;j<b;j++){
      if(i<a-c||j>=d){
        f=e[i-1][j]+e[i][j-1];
        f%=1000000007;
        e[i][j]=f;
    }
  }
  cout<<e[a-1][b-1]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:95:2: error: expected '}' at end of input
   95 | }
      |  ^
a.cc:75:14: note: to match this '{'
   75 | signed main(){
      |              ^
Language: C++

/*
#include <cstdio>
#define ll long long
#define mod 1000000007
using namespace std;

int h, w, a, b;
ll ans;

inline ll c(int a, int b) {
	
}

int main() {
	scanf("%d %d %d %d", &h, &w, &a, &b);
	for (int i = 1; i <= h - a; ++i)
		ans = (ans + c(b + i - 1, i) * c(h - i + w - b - 1, h - i)) % mod;
	printf("%lld", ans);
	return 0;
}
*/

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int fact[ MAXH + MAXW ];

int int_pow( int x, int p ){
    int res = 1;
    while( p ){
        if( p & 1 ) res = 1LL * res * x % MOD;
        x = 1LL * x * x % MOD;
        p >>= 1;
    }
    return res;
}

int mod_inv( int x ){
    return int_pow( x, MOD - 2 );
}

int get_ways( int h, int w ){
    return 1LL * fact[ h + w - 2 ] * mod_inv( fact[ h - 1 ] ) % MOD * mod_inv( fact[ w - 1 ] ) % MOD;
}

void solve(){
    for( int i = fact[ 0 ] = 1; i < MAXH + MAXW; ++i )
        fact[ i ] = 1LL * fact[ i - 1 ] * i % MOD;

    int H, W, A, B; cin >> H >> W >> A >> B;
    int ans = 0;

    for( int i = B + 1; i <= W; ++i )
        ( ans += 1LL * get_ways( H - A, i ) * get_ways( A, W - i + 1 ) % MOD ) %= MOD;

    cout << ans << "\n";
}
int main()
{
    solve();
}

Compiler output:
a.cc:3:11: error: 'MAXH' was not declared in this scope
    3 | int fact[ MAXH + MAXW ];
      |           ^~~~
a.cc:3:18: error: 'MAXW' was not declared in this scope
    3 | int fact[ MAXH + MAXW ];
      |                  ^~~~
a.cc: In function 'int int_pow(int, int)':
a.cc:8:43: error: 'MOD' was not declared in this scope
    8 |         if( p & 1 ) res = 1LL * res * x % MOD;
      |                                           ^~~
a.cc:9:27: error: 'MOD' was not declared in this scope
    9 |         x = 1LL * x * x % MOD;
      |                           ^~~
a.cc: In function 'int mod_inv(int)':
a.cc:16:24: error: 'MOD' was not declared in this scope
   16 |     return int_pow( x, MOD - 2 );
      |                        ^~~
a.cc: In function 'int get_ways(int, int)':
a.cc:20:18: error: 'fact' was not declared in this scope
   20 |     return 1LL * fact[ h + w - 2 ] * mod_inv( fact[ h - 1 ] ) % MOD * mod_inv( fact[ w - 1 ] ) % MOD;
      |                  ^~~~
a.cc:20:65: error: 'MOD' was not declared in this scope
   20 |     return 1LL * fact[ h + w - 2 ] * mod_inv( fact[ h - 1 ] ) % MOD * mod_inv( fact[ w - 1 ] ) % MOD;
      |                                                                 ^~~
a.cc: In function 'void solve()':
a.cc:24:18: error: 'fact' was not declared in this scope
   24 |     for( int i = fact[ 0 ] = 1; i < MAXH + MAXW; ++i )
      |                  ^~~~
a.cc:24:37: error: 'MAXH' was not declared in this scope
   24 |     for( int i = fact[ 0 ] = 1; i < MAXH + MAXW; ++i )
      |                                     ^~~~
a.cc:24:44: error: 'MAXW' was not declared in this scope
   24 |     for( int i = fact[ 0 ] = 1; i < MAXH + MAXW; ++i )
      |                                            ^~~~
a.cc:25:47: error: 'MOD' was not declared in this scope
   25 |         fact[ i ] = 1LL * fact[ i - 1 ] * i % MOD;
      |                                               ^~~
a.cc:31:74: error: 'MOD' was not declared in this scope
   31 |         ( ans += 1LL * get_ways( H - A, i ) * get_ways( A, W - i + 1 ) % MOD ) %= MOD;
      |                                                                          ^~~
Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
const int MAX = 200001;
int mult(int a , int b)
{
	return (a * (LL)b) % mod;
}
int add(int a , int b)
{
	return a + b < mod ? a + b : a + b - mod;
}
int sub(int a , int b)
{
	return a - b >= 0 ? a - b : a - b + mod;
}
int modPow(int a , int step)
{
	int ans = 1;
	while(step)
	{
		if(step & 1)
			ans = mult(ans , a);
		step >>= 1;
		a = mult(a , a);
	}
	return ans;
}
vector<int> fact(MAX) , inv(MAX);
int c(int n , int k)
{
	return mult(fact[n] , mult(inv[n - k] , inv[k]);
}
int ways(int h , int w)
{	
	return c(h + w , w);
}
int main()
{	
	int H , W , A , B;
	cin >> H >> W >> A >> B;
	fact[0] = inv[0] = 1;
	for(int i = 1; i < fact.size(); i++)
	{
		fact[i] = mult(fact[i - 1] , i);
		inv[i] = modPow(fact[i] , mod - 2);
	}
	int ans = ways(H , W);
	for(int i = 0; i < B; i++)
	{
		ans = sub(ans , mult(ways(H - A , i + 1) , ways(A , W - i)));
	}
	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int c(int, int)':
a.cc:33:56: error: expected ')' before ';' token
   33 |         return mult(fact[n] , mult(inv[n - k] , inv[k]);
      |                    ~                                   ^
      |                                                        )
Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
const int MAX = 200001;
int mult(int a , int b)
{
	return (a * (LL)b) % mod;
}
int add(int a , int b)
{
	return a + b < mod ? a + b : a + b - mod;
}
int sub(int a , int b)
{
	return a - b >= 0 ? a - b : a - b + mod;
}
int modPow(int a , int step)
{
	int ans = 1;
	while(step)
	{
		if(step & 1)
			ans = mult(ans , a);
		step >>= 1;
		a = mult(a , a);
	}
	return ans;
}
vector<int> fact(MAX) , inv(MAX);
int c(int n , int k)
{
	return mult(fact[n] , mult(inv[n - k] , inv[k]);
}
int ways(int h , int w)
{	
	return c(h + w , w);
}
int main()
{	
	int H , W , A , B;
	cin >> H >> W >> A >> B;
	fact[0] = inv[0] = 1;
	for(int i = 1; i < fact.size(); i++)
	{
		fact[i] = mult(fact[i - 1] , i);
		inv[i] = modPow(fact[i] , mod - 2);
	}
	int ans = ways(H , W);
	for(int i = 0; i < B; i++)
	{
		ans = sub(ans , mult(ways(H - A , i + 1) , ways(A , N - i)));
	}
	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int c(int, int)':
a.cc:33:56: error: expected ')' before ';' token
   33 |         return mult(fact[n] , mult(inv[n - k] , inv[k]);
      |                    ~                                   ^
      |                                                        )
a.cc: In function 'int main()':
a.cc:52:69: error: 'N' was not declared in this scope
   52 |                 ans = sub(ans , mult(ways(H - A , i + 1) , ways(A , N - i)));
      |                                                                     ^
Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
const int MAX = 200001;
int mult(int a , int b)
{
	return (a * (LL)b) % mod;
}
int add(int a , int b)
{
	return a + b < mod ? a + b : a + b - mod;
}
int sub(int a , int b)
{
	return a - b >= 0 ? a - b : a - b + mod;
}
int modPow(int a , int step)
{
	int ans = 1;
	while(step)
	{
		if(step & 1)
			ans = mult(ans , a);
		step >>= 1;
		a = mult(a , a);
	}
	return ans;
}
int c(int n , int k)
{
	return mult(fact[n] , mult(inv[n - k] , inv[k]);
}
int ways(int h , int w)
{	
	return c(h + w , w);
}
int main()
{	
	int H , W , A , B;
	cin >> H >> W >> A >> B;
	vector<int> fact(MAX) , inv(MAX);
	fact[0] = inv[0] = 1;
	for(int i = 1; i < fact.size(); i++)
	{
		fact[i] = mult(fact[i - 1] , i);
		inv[i] = modPow(fact[i] , mod - 2);
	}
	int ans = ways(h , w);
	for(int i = 0; i < B; i++)
	{
		ans = sub(ans , mult(ways(H - A , i + 1) , ways(A , N - i)));
	}
	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int c(int, int)':
a.cc:32:21: error: 'fact' was not declared in this scope
   32 |         return mult(fact[n] , mult(inv[n - k] , inv[k]);
      |                     ^~~~
a.cc:32:36: error: 'inv' was not declared in this scope; did you mean 'int'?
   32 |         return mult(fact[n] , mult(inv[n - k] , inv[k]);
      |                                    ^~~
      |                                    int
a.cc: In function 'int main()':
a.cc:49:24: error: 'h' was not declared in this scope
   49 |         int ans = ways(h , w);
      |                        ^
a.cc:49:28: error: 'w' was not declared in this scope
   49 |         int ans = ways(h , w);
      |                            ^
a.cc:52:69: error: 'N' was not declared in this scope
   52 |                 ans = sub(ans , mult(ways(H - A , i + 1) , ways(A , N - i)));
      |                                                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
long long fact[1000000];
long long fact_in[1000000];

//出力
void Yes(){ cout << "Yes" << endl; }
void yes(){ cout << "yes" << endl; }
void No(){ cout << "No" << endl; }
void no(){ cout << "no" << endl; }
void Possible(){ cout << "Possible" << endl; }
void possible(){ cout << "possible" << endl; }
void Imossible(){ cout << "Impossible" << endl; }
void imossible(){ cout << "impossible" << endl; }

//マクロ
#define INF 10010010010010010
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
#define sort(a) sort(a.begin(), a.end())
#define reverse(a) reverse(a.begin(), a.end())

long long const MOD = 1000000007;

// 階乗 (mod とりバージョン)
ll fact_mod(ll n, ll mod) {
    ll f = 1; for(long long i = 2; i <= n; i++) f = f * (i % MOD) % MOD;
    return f;
}

// 繰り返し二乗法 (modの世界での累乗)
// ※modが素数の場合、この関数で(mod - 2)乗したら、mod割り算ができるよ！
// (参考問題: ABC034 C問題など)
ll mod_pow(ll x, ll n, ll mod) {
    ll res = 1;
    while(n > 0) {
        if(n & 1) res = (res * x) % mod; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % mod;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}

// 組み合わせ nCr を求める (modあり)
ll combination_mod(ll n, ll r, ll mod) {

    if(r > n-r) r = n-r;    
    long long res = (((fact[n] % mod) * (fact_in[r] % mod)) % MOD) * (fact_in[n - r] % mod)) % mod;

    /*
    if(r == 0) return 1;
    ll a = 1;
    for(long long i = 0; i < r; i++) a = a * ((n-i) % mod) % mod;
    ll b = mod_pow(fact_mod(r, mod), mod-2, mod);
    return (a % mod) * (b % mod) % mod;
    */

    return res;
}

int main(){


    fact[0] = 1;
    for(long long i = 1; i < 1000000; i++){
        fact[i] = ((fact[i - 1] % MOD) * (i % MOD)) % MOD;
    }


    for(ll i = 0; i < 1000000; i++){
        fact_in[i] = mod_pow(fact[i], MOD - 2, MOD) % MOD;
    }

    long long ans = 0;
    long long h, w, a, b; cin >> h >> w >> a >> b;
    a = h - a;
    for(ll j = b + 1; j <= w; j++){
        ans += (combination_mod(a + j - 2, j - 1, MOD) % MOD) * (combination_mod(w - j + h - a - 1, w - j, MOD) % MOD);
        ans %= MOD;
        //cout << a + j - 2 << " " << j - 1 << "   " << w - j + h - a - 1 << " " << w - j << endl;
        //cout << j << " " << ans << endl;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'll combination_mod(ll, ll, ll)':
a.cc:50:92: error: expected ',' or ';' before ')' token
   50 |     long long res = (((fact[n] % mod) * (fact_in[r] % mod)) % MOD) * (fact_in[n - r] % mod)) % mod;
      |                                                                                            ^
Language: C++

/**
 *
 * AtCoder Regular Contest 058 - Problem D: Iroha and the Grid
 *
 * Count the number of ways Iroha can travel from (1,1) to (H, W) in a H x W grid with bottom A 
 * rows and leftmost B columns blocked.
 *
 * Combinatorial solution: compute the number of ways that we can move from O = (1, 1) to 
 * Pk = (k, B) and multiply for the number of ways from Qk = (k, B + 1) to (H, W), 
 * for k = 1, 2, ..., H - A.
 *
 * -----------------------------------
 * |O                   |            | 
 * |                    |            | 
 * |                  Pk|Qk          | 
 * |                    |            | 
 * |                    |            | 
 * |                    |            | 
 * -----------------------------------
 * |xxxxxxxxxxxxxxxxxxxx|            |
 * |xxxxxxxxxxxxxxxxxxxx|            |
 * |xxxxxxxxxxxxxxxxxxxx|            |
 * |xxxxxxxxxxxxxxxxxxxx|           D|
 * -----------------------------------
 *
 * shape(X, Y) = dimensions of the rectangle with upper left corner A and lower right corner B
 *
 * shape(O, Pk) = (k, B)
 * shape(Qk, D) = (H - k + 1, W - B)
 *
 * The number of ways we can travel from (1, 1) to (N, M) in a rectangular grid moving right or 
 * down only is C(M + N - 2, M - 1) = C(M + N - 2, N - 1), because we must walk (M - 1) steps to 
 * right and * (N - 1) steps down, and we must choose when move forward ou move down.
 */
#include <iostream>

using namespace std;

using ll = long long;

const int MAX { 200010 };
const ll MOD { 1000000007 };

ll fact[MAX], inv[MAX];

ll fast_exp(ll a, ll n)
{
    ll res = 1, base = a;

    while (n)
    {
        if (n & 1)
        {
            res *= base;
            res %= MOD;
        }

        base *= base;
        base %= MOD;

        n >>= 1;
    }

    return res;
}

ll binom(int n, int m)
{
    ll res = (fact[n] * inv[m]) % MOD;
    res = (res * inv[n - m]) % MOD;

    return res;
}

void precomp()
{
    fact[0] = inv[0] = 1;

    for (int n = 1; n < MAX; ++n)
        fact[n] = (n * fact[n - 1]) % MOD;

    // Fermat Theorem to compute inverse mod p
    for (int n = 1; n < MAX; ++n)
        inv[n] = fast_exp(fact[n], MOD - 2);
}

// Ways we can move from (1, 1) to (h, w) 
ll ways(int h, int w)
{
    return binom(h + w - 2, h - 1);
}

int main()
{
    ios::sync_with_stdio(false);
    precomp();

    int H, W, A, B;
    cin >> H >> W >> A >> B;

    ll total = 0;

    for (int k = 1; k <= H - A; ++h)
    {
        total += (ways(k, B) * ways(H - k + 1, W - B)) % MOD;
        total %= MOD;
    }

    cout << total << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:103:35: error: 'h' was not declared in this scope
  103 |     for (int k = 1; k <= H - A; ++h)
      |                                   ^
Language: C++

#include"stdafx.h"
#include<iostream>
#include<algorithm>
#include<functional>
#include <string>
#include<iomanip>
#include<cstdio>
#include<math.h>
#include<stack>
#include<queue>
#include<cstring>
#include<vector>
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EREP(i,n) for(int i=(n-1);i>=0;--i)
#define D(n,retu) REP(i,n){cin>>retu[i];}
#define mod 1000000007
#define MIN -93193111451418101
#define INF 931931114518101
using namespace std;
typedef long long int ll;
template<typename T>
void fill_all(T& arr, const T& v) {
	arr = v;
}
template<typename T, typename ARR>
void fill_all(ARR& arr, const T& v) {
	for (auto& i : arr) { fill_all(i, v); }
}
#define MAX_NUM 50
long long comb[MAX_NUM + 1][MAX_NUM + 1];

ll par[100000], depth[100000];
static void calc_comb()
{
	for (uint32_t i = 0; i <= MAX_NUM; i++) {
		for (uint32_t j = 0; j <= i; j++) {
			if ((j == 0) || (i == j)) {
				comb[i][j] = 1;
			}
			else {
				comb[i][j] = comb[i - 1][j - 1] + comb[i - 1][j];
			}
		}
	}
}


//------------------変数-----------------------//
	ll h, w, a, b;
//-------------------関数----------------------//
ll yojou(ll a, ll b, ll p) {//aのb乗をpで割ったあまりを計算する関数
	if (b == 0) { return 1; }//0乗は1
	if (b % 2 == 0) {//２の倍数なら省略できて
		ll d = yojou(a, b / 2, p);//わるう
		return (d*d) % p;//２割ったので二乗う
	}
	return a*yojou(a, b - 1, p) % p;//２で割れないなら一個進める
}

ll combinationwithmod(ll h, ll w) {//h,wは点の数ではなく辺の数です
	ll cnt = 1;
	if (w < h) { swap(w, h); }
	for (int i = w + 1; i <= w + h; i++)
	{
		cnt = cnt * i%mod;
	}
	for (int i = 1; i <= h; i++)
	{
		cnt = cnt*yojou(i, mod - 2, mod) % mod;
	}return cnt;
}
bool in(ll y,ll x) {
	if (x > w || y > h) { return false; }
	else { return true; }
}

int main() {
	cin >> h >> w >> a >> b;
	h--; w--; a--; b--;

	ll cnt = 0;
	if (a) {
		for (ll i = b; i <= w; i++)
		{
			cnt+=combinationwithmod(h - a, i)*combinationwithmod(a-1,w-i);
			cnt %= mod;
		}
	}
	cout << cnt%mod << endl;
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdafx.h: No such file or directory
    1 | #include"stdafx.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

//code by 27.
#include<stdio.h>
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
#include<vector>
#include<queue>
#include<map>
#include<stack>
#include<fstream>
#include<stdlib.h>
#include<set>
#include<cassert>
#include<climits>
#include<cmath>
#include<memory.h>
#include<conio.h>
#include<windows.h>
#include<ctime>
using namespace std;
long long ypa(long long n,long long k)//a^
{
	//cout<<"3";                                                                                                                                                  
	if(k==1)return n;
	if(k==0)return 1;
	unsigned long long t=ypa(n,k/3);
	if(k%3==0)return t*t%1000000007*t%1000000007;
	else if(k%3==1)return t*t%1000000007*t%1000000007*n%1000000007;
	else if(k%3==2)return t*t%1000000007*t%1000000007*n%1000000007*n%1000000007;
}
long long c(long long a,long long b)
{
	//cout<<"2"<<endl;
	a=min(a,b-a);
	if(a==0)return 1;
	long long s1=1,s2=1;
	for(int i=1;i<=a;i++)
	{
		s1*=i;
		s1=s1%1000000007;
		s2*=i+b-a;
		s2=s2%1000000007;
	}
	return s2*ypa(s1,1000000005)%1000000007;
}
int main()
{
	long long n,m,a,b;
	cin>>n>>m>>a>>b;
	long long s=0;
	long long s1=c(n-a-1,n-a+b-2);
	long long s2=c(a-1,m+a-b-1);
	for(long long i=b+1;i<=m;i++)
	{
		s1=s1*(n-a+i-2)/(n-a+i-3-(n-a-1)+1);
		//cout<<"s1:"<<s1<<"*"<<n-a+i-2<<"/"<<n-a+i-3-(n-a-1)+1<<endl;
		//cout<<"s2:"<<s2<<"*"<<m+a-i-(a-1)<<"/"<<m+a-i<<endl;
		s2=s2*(m+a-i-(a-1))/(m+a-i);
		s1=s1%100000007;
		s2=s2%100000007;
		s+=s1*s2;
		s=s%1000000007;
	}
	cout<<s;
    return 0;
}

Compiler output:
a.cc:19:9: fatal error: conio.h: No such file or directory
   19 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#define SIZE 200005
#define MOD 1000000007
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
ll inv[SIZE],fac[SIZE],finv[SIZE];
void make()
{
	fac[0]=fac[1]=1;
	finv[0]=finv[1]=1;
	inv[1]=1;
	for(int i=2;i<SIZE;i++)
	{
		inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
		fac[i]=fac[i-1]*(ll) i%MOD;
		finv[i]=finv[i-1]*inv[i]%MOD;
	}
}
ll C(int a,int b)
{
	if(a<b) return 0;
	return fac[a]*(finv[b]*finv[a-b]%MOD)%MOD;
}
int main()
{
	make();
	int W,H,A,B;
	scanf("%d %d %d %d",&H,&W,&A,&B);W--,H--;
	ll ret=C(W+H,W);
	for(int i=0;i<B;i++)
	{
		ll all=C((H-A)+i,i);
		ll all2=C((W-i)+(A-1),A-1);
		ret-=all*all2%MOD;
		if(ret<0) ret+=MOD;
	}
	printf("%lld\n",ret);
	return 0;
}


Compiler output:
a.cc:6:9: error: 'pair' does not name a type
    6 | typedef pair <int,int> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'scanf' was not declared in this scope
   30 |         scanf("%d %d %d %d",&H,&W,&A,&B);W--,H--;
      |         ^~~~~
a.cc:39:9: error: 'printf' was not declared in this scope
   39 |         printf("%lld\n",ret);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define SIZE 200005
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <utility>
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PI 4*atan(1.0)
typedef long long ll;
typedef long double ld;
using namespace std;
int dx[4]={0,0,-1,1};
int dy[4]={-1,1,0,0};

int calc(long long int a,long long int b,long long int p){
	if(!b) return 1;
	else if(!(b%2)){
		long long int d=calc(a,b/2,p);
		return (d*d)%p;
	}else return (a*calc(a,b-1,p))%p;
}
const int MAX=100001;

int main(){
	int H,W,A,B;
	ll ans=0;
	cin>>H>>W>>A>>B;
	ll inv[MAX]={};
	ll uniteA[MAX]={},uniteB[MAX]={};
	for(int i=1;i<MAX;i++){
		inv[i]=calc(i,MOD-2,MOD);
	}
	for(int i=B;i<=W-1;i++){
		ll temp=1;
		for(int j=1;j<=i+H-A-1;j++)
			temp=temp*j%MOD;
		for(int j=1;j<=H-A-1;j++)
			temp=temp*inv[j]%MOD;
		for(int j=1;j<=i;j++)
			temp=temp*inv[j]%MOD;
		uniteA[W-i-1]=temp;
		if(uniteA[W-i-1])
			//printf("uniteA[%d]=%d\n",W-i-1,uniteA[W-1-i]);
	}
	for(int i=W-B-1;i>=0;i--){
		ll temp=1;
		for(int j=1;j<=i+A-1;j++)
			temp=temp*j%MOD;
		for(int j=1;j<=A-1;j++)
			temp=temp*inv[j]%MOD;
		for(int j=1;j<=i;j++)
			temp=temp*inv[j]%MOD;
		uniteB[i]=temp;
		if(uniteB[i])
			//printf("uniteB[%d]=%d\n",i,uniteB[i]);
	}
	for(int i=0;i<MAX;i++)
		ans=(ans+(uniteA[i]*uniteB[i])%MOD)%MOD;

	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:9: error: expected primary-expression before '}' token
   54 |         }
      |         ^
a.cc:66:9: error: expected primary-expression before '}' token
   66 |         }
      |         ^
Language: C++


#include <iostream>
#include <string.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned ll
#define db double
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PII pair<int, int>

int h,w,a,b;
ll f[100010];
ll finv[100010];

ll c(ll n,ll m) {
    ll ret=f[n];
    ret=(ret*finv[n-m])%MOD;
    ret=(ret*finv[m])%MOD;
    return ret;
}

ll calc(ll i,ll j) {
    return c(i+j-2,i-1);
}

ll qp(ll x,ll n) {
    ll ret=1;
    while (n) {
        if (n&1) ret=(ret*x)%MOD;
        n=n>>1;
        x=(x*x)%MOD;
    }
    return ret;
}

int main() {
    scanf("%d%d%d%d",&h,&w,&a,&b);
    memset(f,0,sizeof(f));
    memset(finv,0,sizeof(finv));
    f[0]=invf[0]=1;
    for (int i=1;i<=100000;i++) {
        f[i]=(f[i-1]*i)%MOD;
        finv[i]=qp(f[i],MOD-2);
    }
    ll ans=0;
    for (int i=1;i<=w-b;i++) {
        ans=(ans+(calc(a,i)*calc(h-a,w-i+1))%MOD)%MOD;
    }
    printf("%lld\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:10: error: 'invf' was not declared in this scope
   45 |     f[0]=invf[0]=1;
      |          ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<boost/multi_array.hpp>

typedef unsigned long long uint64;
typedef long long int64;
template<uint64 Mod>class mod_t
{
	uint64 val;
public:
	mod_t(uint64_t v) :val(v%Mod)
	{

	}
	mod_t(int64 v) :val(v%Mod)
	{

	}
	mod_t(int v = 0) : val(v%Mod)
	{

	}
	mod_t(unsigned v) :val(v%Mod)
	{

	}

	uint64 operator*()const
	{
		return val;
	}
};
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return (*lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, int rhs)
{
	return (*lhs + rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(int lhs, mod_t<Mod> rhs)
{
	return (lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return (*lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, int rhs)
{
	return (*lhs - rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(int lhs, mod_t<Mod> rhs)
{
	return (lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return (*lhs * *rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, int rhs)
{
	return (*lhs * rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(int lhs, mod_t<Mod> rhs)
{
	return (lhs * *rhs);
}

typedef mod_t<1000000007> mod197;

void Main();
int main()
{
	std::cin.sync_with_stdio(false);
	std::cout << std::setprecision(std::numeric_limits<long double>::digits10 + 1);
	Main();
}

void Main()
{
	int H, W, A, B;
	std::cin >> H >> W >> A >> B;
	auto max = std::max(W + H - A, W + H - B);
	boost::multi_array<mod197, 2> C(boost::extents[max + 1][max + 1]);

	for (int i{};i <= max;++i)
	{
		C[i][0] = 1;
		C[i][i] = 1;
	}
	for (int i = 1;i <= max;++i)
	{
		for (int j = 1;j < i;++j)
		{
			C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
		}
	}
	mod197 ret;
	for (int k = B + 1;k <= W;++k)
	{
		ret = ret + C[k + H - A - 2][k - 1] * C[A + W - k - 1][A - 1];
	}
	std::cout << *ret << std::endl;
}

Compiler output:
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory
    6 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<boost/multi_array.hpp>

typedef unsigned long long uint64;
typedef long long int64;
template<uint64 Mod>class mod_t
{
	uint64 val;
public:
	explicit mod_t(uint64_t v) :val(v%Mod)
	{

	}
	explicit mod_t(int64 v) :val(v%Mod)
	{

	}
	mod_t(int v = 0) : val(v%Mod)
	{

	}
	explicit mod_t(unsigned v) :val(v%Mod)
	{

	}

	uint64 operator*()const
	{
		return val;
	}
};
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs + rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs - rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs * *rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs * rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs * *rhs);
}

typedef mod_t<1000000007> mod197;

void Main();
int main()
{
	std::cin.sync_with_stdio(false);
	std::cout << std::setprecision(std::numeric_limits<long double>::digits10 + 1);
	Main();
}

void Main()
{
	int H, W, A, B;
	std::cin >> H >> W >> A >> B;
	auto max = std::max(W + H - A, W + H - B);
	boost::multi_array<mod197, 2> C(boost::extents[max + 1][max + 1]);

	for (int i{};i <= max;++i)
	{
		C[i][0] = 1;
		C[i][i] = 1;
	}
	for (int i = 1;i <= max;++i)
	{
		for (int j = 1;j < i;++j)
		{
			C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
		}
	}
	mod197 ret;
	for (int k = B + 1;k <= W;++k)
	{
		ret = ret + C[k + H - A - 2][k - 1] * C[A + W - k - 1][A - 1];
	}
	std::cout << *ret << std::endl;
}

Compiler output:
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory
    6 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<boost/multi_array.hpp>

typedef unsigned long long uint64;
typedef long long int64;
template<uint64 Mod>class mod_t
{
	uint64 val;
public:
	mod_t(uint64_t v) :val(v%Mod)
	{

	}
	mod_t(int64 v) :val(v%Mod)
	{

	}
	mod_t(int v = 0) : val(v%Mod)
	{

	}
	mod_t(unsigned v) :val(v%Mod)
	{

	}

	uint64 operator*()const
	{
		return val;
	}
};
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs + rhs);
}
template<uint64 Mod>mod_t<Mod> operator+(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs + *rhs);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs - rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator-(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs - *rhs + Mod);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(*lhs * *rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(mod_t<Mod> lhs, int rhs)
{
	return mod_t<Mod>(*lhs * rhs);
}
template<uint64 Mod>mod_t<Mod> operator*(int lhs, mod_t<Mod> rhs)
{
	return mod_t<Mod>(lhs * *rhs);
}

typedef mod_t<1000000007> mod197;

void Main();
int main()
{
	std::cin.sync_with_stdio(false);
	std::cout << std::setprecision(std::numeric_limits<long double>::digits10 + 1);
	Main();
}

void Main()
{
	int H, W, A, B;
	std::cin >> H >> W >> A >> B;
	auto max = std::max(W + H - A, W + H - B);
	boost::multi_array<mod197, 2> C(boost::extents[max + 1][max + 1]);

	for (int i{};i <= max;++i)
	{
		C[i][0] = 1;
		C[i][i] = 1;
	}
	for (int i = 1;i <= max;++i)
	{
		for (int j = 1;j < i;++j)
		{
			C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
		}
	}
	mod197 ret;
	for (int k = B + 1;k <= W;++k)
	{
		ret = ret + C[k + H - A - 2][k - 1] * C[A + W - k - 1][A - 1];
	}
	std::cout << *ret << std::endl;
}

Compiler output:
a.cc:6:9: fatal error: boost/multi_array.hpp: No such file or directory
    6 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

using namespace std;

#define MAX_H 100000
#define MAX_W 100000
#define MOD 1000000007

bool visited[MAX_H][MAX_W];
int memo[MAX_H][MAX_W];

int h,w,a,b,top;

int solve(int y,int x){
	if(x < b && top <= y) return 0;
	if(x == 0 || y == 0) return 1;
	if(visited[y][x]) return memo[y][x];
	visited[y][x] = true;
	return memo[y][x] = (solve(y-1,x) + solve(y,x-1)) % MOD;
}

int main(){
	cin >> h >> w >> a >> b;
	top = h - a;
	cout << solve(h-1,w-1) << endl;
	return 0;
}


Compiler output:
/tmp/cchIJVN7.o: in function `solve(int, int)':
a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against symbol `top' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x8b): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x125): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x14c): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/cchIJVN7.o
/tmp/cchIJVN7.o: in function `main':
a.cc:(.text+0x160): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x17c): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x191): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x1a6): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `h' defined in .bss section in /tmp/cchIJVN7.o
a.cc:(.text+0x1bd): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
// #include <iostream>
// #include <algorithm>
// #include <string>
// #include <vector>
// #include <queue>
// #include <stack>
// #include <set>
// #include <map>

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a;i >= n;i--)
#define INF 999999999
#define pb(a) push_back(a)
#define MOD 1000000007

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
using namespace std;

typedef pair<int, int> pii;
typedef long long int ll;
typedef vector<pii> VP;

ll frac(ll x, ll mod) {
    if(x == 0) return 1;
    return (x * frac(x-1, mod)) % mod;
}

ll mod_pow(ll x, ll n, ll mod) {
    ll res = 1;
    while(n > 0) {
        if(n & 1) res = (res * x) % mod; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % mod;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}

int main(void) {
    ll h, w, a, b;
    cin >> h >> w >> a >> b;
    ll x = h - a;
    ll y = w - b;

    ll A = frac(x+b,MOD) * mod_pow(frac(x,MOD) * frac(b,MOD) % MOD, MOD-2);
    ll B = frac(x+y,MOD) * mod_pow(frac(x,MOD) * frac(y,MOD) % MOD, MOD-2);
    ll C = frac(a+y,MOD) * mod_pow(frac(a,MOD) * frac(y,MOD) % MOD, MOD-2);

    cout << ((A * C % MOD) + B) % MOD << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:35: error: too few arguments to function 'll mod_pow(ll, ll, ll)'
   46 |     ll A = frac(x+b,MOD) * mod_pow(frac(x,MOD) * frac(b,MOD) % MOD, MOD-2);
      |                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:30:4: note: declared here
   30 | ll mod_pow(ll x, ll n, ll mod) {
      |    ^~~~~~~
a.cc:47:35: error: too few arguments to function 'll mod_pow(ll, ll, ll)'
   47 |     ll B = frac(x+y,MOD) * mod_pow(frac(x,MOD) * frac(y,MOD) % MOD, MOD-2);
      |                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:30:4: note: declared here
   30 | ll mod_pow(ll x, ll n, ll mod) {
      |    ^~~~~~~
a.cc:48:35: error: too few arguments to function 'll mod_pow(ll, ll, ll)'
   48 |     ll C = frac(a+y,MOD) * mod_pow(frac(a,MOD) * frac(y,MOD) % MOD, MOD-2);
      |                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:30:4: note: declared here
   30 | ll mod_pow(ll x, ll n, ll mod) {
      |    ^~~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class IrohaAndGrid {
	static long[] fact = new long[300000];
	static long mod = (long) 1e9 + 7;

	static long pow(long base, long pow) {
		if (pow == 1)
			return base;
		long half = pow(base, pow / 2);
		half %= mod;
		half *= half;
		half %= mod;
		if (pow % 2 == 1)
			half *= base;
		half %= mod;
		return half;
	}

	static long C(int n, int r) {
		long f = fact[n];
		f *= pow(fact[r], mod - 2);
		f %= mod;
		f *= pow(fact[n - r], mod - 2);
		f %= mod;
		return f;
	}

	public static void main(String[] args) {
		InputReader r = new InputReader(System.in);
		fact[0] = 1;
		for (int i = 1; i < fact.length; i++) {
			fact[i] = fact[i - 1] * i;
			fact[i] %= mod;
		}
		long h = r.nextLong();
		long w = r.nextLong();
		long a = r.nextLong();
		long b = r.nextLong();
		long res = 0;
		for (long i = 1; i <= h - a; i++) {
			long way1 = C((int) (b - 1 + i - 1), (int) b - 1);
			way1 *= C((int) (w - b - 1 + h - i), (int) (h - i));
			way1 %= mod;
			res += way1;
			res %= mod;
		}
		System.out.println(res);
	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			tokenizer = null;
		}

		public InputReader(FileReader stream) {
			reader = new BufferedReader(stream);
			tokenizer = null;
		}

		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


Compiler output:
Main.java:8: error: class IrohaAndGrid is public, should be declared in a file named IrohaAndGrid.java
public class IrohaAndGrid {
       ^
1 error
Language: C++

解けなかった
言われてみると当たり前...解けないとまずそう

Compiler output:
a.cc:1:1: error: '\U000089e3\U00003051\U0000306a\U0000304b\U00003063\U0000305f' does not name a type
    1 | 解けなかった
      | ^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double D;
typedef complex<D> P;
#define F first
#define S second
const ll MOD=1000000007;
//const ll MOD=998244353;

template<typename T,typename U>istream & operator >> (istream &i,pair<T,U> &A){i>>A.F>>A.S; return i;}
template<typename T>istream & operator >> (istream &i,vector<T> &A){for(auto &I:A){i>>I;} return i;}
template<typename T,typename U>ostream & operator << (ostream &o,const pair<T,U> &A){o<<A.F<<" "<<A.S; return o;}
template<typename T>ostream & operator << (ostream &o,const vector<T> &A){ll i=A.size(); for(auto &I:A){o<<I<<(--i?" ":"");} return o;}



int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  //ll N,X,Y,Z;
  //cin>>N>>X>>Y>>Z;
知っているので実質AC

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:1: error: '\U000077e5\U00003063\U00003066\U00003044\U0000308b\U0000306e\U00003067\U00005b9f\U00008ceaAC' was not declared in this scope
   25 | 知っているので実質AC
      | ^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define len(v) ll(v.size())
#define fi first
#define se second

template <class T>
void cout_vec(const vector<T> &vec){
  for(auto itr:vec) cout<<itr<<' ';
  cout<<endl;
}

typedef pair<ll,ll> P;
const ll mod=1e9+7;
const ll inf=1e15;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,x,y,z;
  cin>>n>>x>>y>>z;
  vector<vector<int>> dp(n+1,vector<int>((1<<(x+y+z-1))+10,0));
  int mask=(1ll<<(x+y+z-1))-1;
  int ng=(1<<(x+y+z-1)|(1<<(y+z-1))|(1<<(z-1));
  dp[0][0]=1;
  rep(i,n){
    rep(S,1<<(x+y+z-1)){
      if((S & ng)==ng) continue;
      FOR(j,1,11){
        int T=(S<<j) | (1<<(j-1));
        if((T & ng)==ng) continue;
        T&=mask;
        (dp[i+1][T]+=dp[i][S])%=mod;
      }
    }
  }
  ll ans=1;
  rep(i,n) (ans*=10)%=mod;
  rep(i,1<<(x+y+z-1)) (ans-=dp[n][i])%=mod;
  cout<<(ans+mod)%mod<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:47: error: expected ')' before ';' token
   28 |   int ng=(1<<(x+y+z-1)|(1<<(y+z-1))|(1<<(z-1));
      |          ~                                    ^
      |                                               )
Language: C++

#include <bits/stdc++.h>
#define LL long long
#define pow10 sndaslkknsda
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
int dp[41][4][7];
int W[41][15];
void add(int &a , int b)
{
	a = a + b < mod ? a + b : a + b - mod;
}
int mult(int a , int b)
{	
	return (a * (LL)b) % mod;
}
int ways(int k , int n)
{
	if(k < 0)
	{	
		return 0;
	}
	if(n == 0)
		return k == 0;
	if(W[n][k] != -1)
	{
		return W[n][k];
	}
	int ans = 0;
	for(int digit = 1; digit <= 10; digit++)
		add(ans , ways(n - 1 , k - digit));
	return W[n][k] = ans;
}
int pow10[45];
int main()
{
	memset(W , -1 , sizeof W);
	ios_base::sync_with_stdio(0);
	pow10[0] = 1;
	for(int i = 1; i <= 40; i++)
		pow10[i] = mult(pow10[i - 1] , 10);
	dp[0][0][0] = 1;
	int n;
	vector<int> X(3);
	cin >> n >> X[0] >> X[1] >> X[2];
	int ans = 0;
	for(int x = 0; x < n; x++)
	{
		for(int y = x + 1; y < n; y++)	
		{
			for(int z = y + 1; z < n; z++)
			{
				for(int w = z + 1; w <= n; w++)
				{
					add(ans , mult(pow10[n - w + x] , mult(ways(X[0] , y - x) , mult(ways(X[1] , z - y) , mult(ways(X[2] , w - z)))));
				}
			}
		}
	}
	cout << ans;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:131: error: too few arguments to function 'int mult(int, int)'
   54 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(X[0] , y - x) , mult(ways(X[1] , z - y) , mult(ways(X[2] , w - z)))));
      |                                                                                                                               ~~~~^~~~~~~~~~~~~~~~~~~~
a.cc:12:5: note: declared here
   12 | int mult(int a , int b)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define LL long long
#define pow10 sndaslkknsda
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
int dp[41][4][7];
int W[41][15];
void add(int &a , int b)
{
	a = a + b < mod ? a + b : a + b - mod;
}
int mult(int a , int b)
{	
	return (a * (LL)b) % mod;
}
int ways(int n , int k)
{
	if(k < 0)
	{	
		return 0;
	}
	if(n == 0)
		return k == 0;
	if(W[n][k] != -1)
	{
		return W[n][k];
	}
	int ans = 0;
	for(int digit = 1; digit <= 10; digit++)
		add(ans , ways(n - 1 , k - digit));
	return W[n][k] = ans;
}
int pow10[45];
int main()
{
	memset(W , -1 , sizeof W);
	ios_base::sync_with_stdio(0);
	pow10[0] = 1;
	for(int i = 1; i <= 40; i++)
		pow10[i] = mult(pow10[i - 1] , 10);
	dp[0][0][0] = 1;
	int n;
	vector<int> x(3);
	cin >> n >> x[0] >> x[1] >> x[2];
	int ans = 0;
	for(int x = 0; x < n; x++)
	{
		for(int y = x + 1; y < n; y++)	
		{
			for(int z = y + 1; z < n; z++)
			{
				for(int w = z + 1; w <= n; w++)
				{
					add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
				}
			}
		}
	}
	cout << ans;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:86: error: invalid types 'int[int]' for array subscript
   54 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                      ^
a.cc:54:112: error: invalid types 'int[int]' for array subscript
   54 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                                                ^
a.cc:54:138: error: invalid types 'int[int]' for array subscript
   54 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                                                                          ^
Language: C++

#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
int dp[41][4][7];
int W[41][15];
void add(int &a , int b)
{
	a = a + b < mod ? a + b : a + b - mod;
}
int mult(int a , int b)
{	
	return (a * (LL)b) % mod;
}
int ways(int n , int k)
{
	if(k < 0)
	{	
		return 0;
	}
	if(n == 0)
		return k == 0;
	if(W[n][k] != -1)
	{
		return W[n][k];
	}
	int ans = 0;
	for(int digit = 1; digit <= 10; digit++)
		add(ans , ways(n - 1 , k - digit));
	return W[n][k] = ans;
}
int pow10[45];
int main()
{
	memset(W , -1 , sizeof W);
	ios_base::sync_with_stdio(0);
	pow10[0] = 1;
	for(int i = 1; i <= 40; i++)
		pow10[i] = mult(pow10[i - 1] , 10);
	dp[0][0][0] = 1;
	int n;
	vector<int> x(3);
	cin >> n >> x[0] >> x[1] >> x[2];
	int ans = 0;
	for(int x = 0; x < n; x++)
	{
		for(int y = x + 1; y < n; y++)	
		{
			for(int z = y + 1; z < n; z++)
			{
				for(int w = z + 1; w <= n; w++)
				{
					add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
				}
			}
		}
	}
	cout << ans;
	
	return 0;
}


Compiler output:
a.cc:32:5: warning: built-in function 'pow10' declared as non-function [-Wbuiltin-declaration-mismatch]
   32 | int pow10[45];
      |     ^~~~~
a.cc: In function 'int main()':
a.cc:53:86: error: invalid types 'int[int]' for array subscript
   53 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                      ^
a.cc:53:112: error: invalid types 'int[int]' for array subscript
   53 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                                                ^
a.cc:53:138: error: invalid types 'int[int]' for array subscript
   53 |                                         add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z)))));
      |                                                                                                                                          ^
Language: C

#include <iostream>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;

template <typename T, typename U>
T mypow(T b, U n) {
    if (n == 0) return 1;
    if (n == 1) return b % MOD;
    if (n % 2 == 0) {
        return mypow(b * b % MOD, n / 2);
    } else {
        return mypow(b, n - 1) * b % MOD;
    }
}

ll dp[50][1 << 18];
// dp[i][S] = i個の数値でSが作れるパターン数

int main() {
    int N, X, Y, Z;
    cin >> N >> X >> Y >> Z;
    int W = X + Y + Z;

    fill(dp[0], dp[45], 0);
    dp[0][0] = 1;

    ll ans = 0;

    for (int i = 0; i <= N; ++i) {
        for (int S = 0; S < (1 << W); ++S) {
            if (((S >> (X - 1)) & 1) && ((S >> (X + Y - 1)) & 1) && ((S >> (X + Y + Z - 1)) & 1)) {
                ans += dp[i][S] * mypow(10LL, N - i);
                ans %= MOD;
                dp[i][S] = 0;
            }
        }

        for (int S = 0; S < (1 << W); ++S) {
            for (int k = 1; k <= 10; ++k) {
                int T = ((S << k) + (1 << (k - 1))) & ((1 << W) - 1);
                dp[i + 1][T] += dp[i][S];
                dp[i + 1][T] %= MOD;
            }
        }
    }

    cout << ans << endl;
    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.