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

#include <bits/stdc++.h>
#define loop(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  loop(i,0,n)
#define dump(x)  cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << endl

using namespace std;


int main(){
  ios_base::sync_with_stdio(false); cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> hate(k);
  rep(i,k) cin >> hate[i];
  vector<int> like = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  rep(i,k){
    like.erase(remove(like.begin(), like.end(), hate[i]), like.end());
  }
  string str_n = to_string(n);
  int kuriagari = 0;
  sort(like.begin(), like.end());
  int max_like = *max_element(like.begin(), like.end());
  int min_like = *min_element(like.begin(), like.end());
  vector<int> ans;
  for(int i = str_n.size() -1;i>=0;i--){
    int t = str_n[i] - '0';
    int kk = 0;
    if(kuriagari == 1){
      t++;
    }
    if(t >= 10){
      t = 0;
      kk = 1;
    }
    if( t > max_like || kk = 1){
      kuriagari = 1;
      ans.push_back(min_like);
    }else{
      kuriagari = 0;
      ans.push_back(*lower_bound(like.begin(), like.end(), t));
    }
  }
  if(kuriagari == 1){
    ans.push_back(*upper_bound(like.begin(), like.end(), 0));
  }
  for(int i = ans.size()-1;i>=0;i--){
    cout << ans[i] ;
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: lvalue required as left operand of assignment
   36 |     if( t > max_like || kk = 1){
      |         ~~~~~~~~~~~~~^~~~~
Language: C++

int SolveCSub(int pay, int digit, const bool hate[10], int N){
  if(digit <= 0){
    if(pay >= N) return pay;
    else return 100000;
  }

  int iret = 100000;
  for(int i = 0; i < 10; i++){
    if(hate[i] && !(i == 0 && digit == 10000)) continue;
    int a = SolveCSub(pay + i * digit, digit/10, hate, N);
    if (a < iret) iret = a;
  }
  return iret;
}

void SolveC(){
  bool hate[10] = {false};
  int N, K;
  cin >> N >> K;
  for(int i = 0; i < K; i++){
    int a;
    cin >> a;
    hate[a] = true;
  }

  cout << SolveCSub(0,100000,hate, N) << endl;
}

//int dp[100001];
int main(){
  SolveC();
/*
  const int kDiv = 1000000007;
  int H, W, A, B;
  cin >> H >> W >> A >> B;

  dp[0] = 1;
  for(int y = 0; y < H-A; y++)
    for(int x = 0; x < W; x++)
      dp[x+1] = (dp[x+1] + dp[x]) % kDiv;

  for(int y = 0; y < A; y++)
    for(int x = B; x < W; x++)
      dp[x+1] = (dp[x+1] + dp[x]) % kDiv;
  cout << dp[W-1] << endl;
*/
  return 0;
}


Compiler output:
a.cc: In function 'void SolveC()':
a.cc:19:3: error: 'cin' was not declared in this scope
   19 |   cin >> N >> K;
      |   ^~~
a.cc:26:3: error: 'cout' was not declared in this scope
   26 |   cout << SolveCSub(0,100000,hate, N) << endl;
      |   ^~~~
a.cc:26:42: error: 'endl' was not declared in this scope
   26 |   cout << SolveCSub(0,100000,hate, N) << endl;
      |                                          ^~~~
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		List<Integer> Dlist = new ArrayList<>();
    for(int i=0; i<K; i++){
      Diist.add(sc.nextInt());
    }
    for(int i=N;i==10000;i++){
      while(i/10 != 0){
          for(int D: Dlist){
            if(D== i%10){
              break;
            }
          }
        }
        System.out.println(i);
        break;
      }
    }
	}


Compiler output:
Main.java:10: error: cannot find symbol
      Diist.add(sc.nextInt());
      ^
  symbol:   variable Diist
  location: class Main
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int cmp(const void *a, const void *b){
	return *(const int*)a-*(const int*)b;
}

int main(){
	int i,j,n,k;
	char s[5];
	char a[10];
	int len;
	int d[10];
	
	scanf("%d%d",&n,&k);
	itoa(n,s,10);
	for(i=k;i--;)scanf("%d",&d[i]);
	qsort(d,k,sizeof(d[0]),cmp);
	for(i=k;i--;)a[i]=d[i]+'0';
	len = strlen(s);

	for(i = 0;i < len;i++){
		for(j = 0;j < k;j++){
			if(s[i]==a[j]){
				s[i]++;
			}else break;
		}
	}
	printf("%d\n",atoi(s));
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:9: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
   17 |         itoa(n,s,10);
      |         ^~~~
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		List<int> Dlist = new ArrayList<>();
    for(int i=0; i<K; i++){
      Diist.add(sc.nextInt());
    }
    for(int i=N;i==10000;i++){
      while(i/10 != 0){
          for(int D: Dlist){
            if(D== i%10){
              break;
            }
          }
        }
        System.out.println(i);
        break;
      }
    }
	}


Compiler output:
Main.java:8: error: unexpected type
		List<int> Dlist = new ArrayList<>();
		     ^
  required: reference
  found:    int
Main.java:10: error: cannot find symbol
      Diist.add(sc.nextInt());
      ^
  symbol:   variable Diist
  location: class Main
2 errors
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		List<int> Dlist = new ArrayList<>();
    for(int i=0; i<K; i++){
      Diist.add(sc.nextInt();
    }
    for(int i=N;i==10000;i++){
      while(i/10 != 0){
          for(int D: Dlist){
            if(D== i%10){
              break;
            }
          }
        }
        System.out.println(i);
        break;
      }
    }
	}


Compiler output:
Main.java:10: error: ')' or ',' expected
      Diist.add(sc.nextInt();
                            ^
1 error
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		List<int> Dlist = new ArrayList<>();
    for(int i=0; i<K; i++){
      Diist.add(K);
    }
    for(int i=N;i==10000;i++){
      while(i/10 != 0){
          for(int D: Dlist){
            if(D== i%10){
              break;
            }
          }
        }
        System.out.println(i);
        break;
      }
    }
	}


Compiler output:
Main.java:8: error: unexpected type
		List<int> Dlist = new ArrayList<>();
		     ^
  required: reference
  found:    int
Main.java:10: error: cannot find symbol
      Diist.add(K);
      ^
  symbol:   variable Diist
  location: class Main
2 errors
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		List<int> Dlist = new ArrayList<>();
    for(int i=0; i<K; i++){
      Diist.add(K);
    }
    for(int i=N;i==10000;i++){
      while(i/10 != 0){
          for(int D: Dlist){
            if(D== i%10){
              break;
            }
          }
        }
        System.out.println(i);
        break;
      }
    }
	}
}


Compiler output:
Main.java:25: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <limits>
#include <cassert>
#include <fstream>
#include <cstring>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <ciso646>
#include <array>

using namespace std;

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

#define inf 0x3f3f3f3f
#define uinf 0x3f3f3f3f3f3f3f3f
#define CLEAR(a) a = decltype(a)()
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define pii pair<int ,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define VVI vector<vector<int>>
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define pi 2*acos(0.0)
#define INFILE() freopen("in.txt","r",stdin)
#define OUTFILE() freopen("out.txt","w",stdout)
#define ll long long
#define ull unsigned long long
#define eps 1e-14
#define FIN std::ifstream cin("D:\input.txt")

vector<int> A;
int N;
int siz;

int d(vector<int> nums) {
	nums.push_back(-1000000);
	for (auto a : A) {
		nums.back() = a;
		int num = 0;
		if (siz == nums.size()) {
			REP(i, nums.size()) num += nums[i] * pow(10, i);
		}
		else {
			num = d(nums);
		}
		if (N <= num) return num;
	}
	return -1;
}

signed main(void) {
	cin >> N;
	siz = (int)log10(N)+1;

	int K; cin >> K;
	bitset<10> D;
	REP(i, K) {
		int a; cin >> a;
		D[a] = true;
	}
	REP(i, 10) if (not D[i]) A.push_back(i);

	int res = d(vector<int>());
	if (res >= 0) {
		cout << res << endl;
		return 0;
	}

	if (A[0] == 0) {
		cout << A[1];
	}
	else cout << A[0];

	REP(i, siz-1) cout << A[0];
	cout << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int d(std::vector<int>)':
a.cc:57:62: error: 'pow' was not declared in this scope
   57 |                         REP(i, nums.size()) num += nums[i] * pow(10, i);
      |                                                              ^~~
a.cc: In function 'int main()':
a.cc:69:20: error: 'log10' was not declared in this scope
   69 |         siz = (int)log10(N)+1;
      |                    ^~~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int N, K;
		N = scanner.nextInt();
		K = scanner.nextInt();

		String[] D = new String[K];
		for (int i = 0; i < K; i++) {
			D[i] = scanner.next();

		}
		a: while (true) {
			for (int i = 0; i < D.length; i++) {
				if (Integer.toString(N).contains(D[i])) {
					N++;
					continue a;
				}
			}
			break;
		}
		System.out.println(N);

	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>

#define ll long long
#define LL long long
#define ULL unsigned long long 
#define ull unsigned long long 
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)

using namespace std;

int main()
{
	int ans[100];
	int K;
	int num_count;
	int j=0;
	int D[10];
	bool judge[10] = {};
	int tmpnum = 10;
	char N[10000] = {};
	int tmp[10] = {};
	cin >> N >> K;
	REP(i, 10) {
		judge[i] = true;
	}
	REP(i, K) {
		cin >> D[i];
		judge[D[i]] = false;
	}
	REP(i, 10) {
		if (judge[i] == true) {
			tmp[j] = i;
			j++;
		}
	}
	num_count = strlen(N);
	REP(i, num_count) {
		REP(j, 10 -K) {
			if (j == 0&& N[i] - 48 <= tmp[j]) {
				tmpnum = tmp[j];
			}

			if (N[i]-48 <= tmp[j]&&tmpnum>tmp[j]) {

				tmpnum = tmp[j];
				
			}
		}
		ans[i] = tmpnum;
	}
	REP(i, strlen(N)) {
		cout << ans[i];
	}
	cout << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: 'strlen' was not declared in this scope
   46 |         num_count = strlen(N);
      |                     ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<map>
  +++ |+#include <cstring>
    9 |
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>

#define ll long long
#define LL long long
#define ULL unsigned long long 
#define ull unsigned long long 
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)

using namespace std;

int main()
{
	int ans[100];
	int K;
	int num_count;
	int j=0;
	int D[10];
	bool judge[10] = {};
	int tmpnum = 10;
	char N[10000] = {};
	int tmp[10] = {};
	cin >> N >> K;
	REP(i, 10) {
		judge[i] = true;
	}
	REP(i, K) {
		cin >> D[i];
		judge[D[i]] = false;
	}
	REP(i, 10) {
		if (judge[i] == true) {
			tmp[j] = i;
			j++;
		}
	}
	num_count = strlen(N);
	REP(i, num_count) {
		REP(j, 10 -K) {
			if (N[i]-48 <= tmp[j]&&tmpnum>tmp[j]) {
				tmpnum = tmp[j];
				
			}
		}
		ans[i] = tmpnum;
	}
	REP(i, strlen(N)) {
		cout << ans[i];
	}
	cout << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:21: error: 'strlen' was not declared in this scope
   46 |         num_count = strlen(N);
      |                     ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<map>
  +++ |+#include <cstring>
    9 |
Language: C++

#include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include <cstdlib>
#include<string>
#include<algorithm>
#include<map>

#define ll long long
#define LL long long
#define ULL unsigned long long 
#define ull unsigned long long 
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)

using namespace std;

int main()
{
	int ans[100];
	int K;
	int num_count;
	int j=0;
	int D[10];
	bool judge[10] = {};
	int tmpnum = 10;
	char N[10000] = {};
	int tmp[10] = {};
	cin >> N >> K;
	REP(i, 10) {
		judge[i] = true;
	}
	REP(i, K) {
		cin >> D[i];
		judge[D[i]] = false;
	}
	REP(i, 10) {
		if (judge[i] == true) {
			tmp[j] = i;
			j++;
		}
	}
	
	REP(i, strlen(N)) {
		REP(j, 10 -K) {
			if (N[i]-48 <= tmp[j]&&tmpnum>tmp[j]) {
				tmpnum = tmp[j];
				
			}
		}
		ans[i] = tmpnum;
	}
	REP(i, strlen(N)) {
		cout << ans[i];
	}
	cout << endl;


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:16: error: 'strlen' was not declared in this scope
   47 |         REP(i, strlen(N)) {
      |                ^~~~~~
a.cc:16:32: note: in definition of macro 'REP'
   16 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<map>
  +++ |+#include <cstring>
    9 | 
a.cc:56:16: error: 'strlen' was not declared in this scope
   56 |         REP(i, strlen(N)) {
      |                ^~~~~~
a.cc:16:32: note: in definition of macro 'REP'
   16 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:56:16: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   56 |         REP(i, strlen(N)) {
      |                ^~~~~~
a.cc:16:32: note: in definition of macro 'REP'
   16 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int main(){
	
	int N,K,tmp;
	vector<int> D;
	string stream ss;
	string s;
	bool flg=true;
	cin>>N>>K;

	for(int i=0;i<K;i++){
		cin>>tmp;
		D.push_back(tmp);
	}

	for(int i=N;i<N*10;i++){
		ss<<i;
		s=ss.str();
		flg=true;
		for(int j=0;j<s.size();j++){
			for(int k=0;k<K;k++){
				if(s[j]==D[k]){
					flg=false;
				}
			}
		}
		if(flg){
			cout<<i<<endl;
			return 0;
		}
	}
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: expected initializer before 'ss'
   20 |         string stream ss;
      |                       ^~
a.cc:31:17: error: 'ss' was not declared in this scope; did you mean 's'?
   31 |                 ss<<i;
      |                 ^~
      |                 s
Language: C++


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <complex>
#include <functional>
#include <cmath>

using namespace std;

using ull = unsigned long long;
using ll = long long;


int main(){

	int N, K;
	cin >> N >> K;

	vector<string> isUnuse;
	for (int i = 0; i < K; i++){
		string temp;
		cin >> temp;
		isUnuse.emplace_back(temp);
	}

	while (1){
		string str = to_string(N);
		int count = 0;
		for (auto&& a : isUnuse){
			if (strstr(str.c_str(), a.c_str()) == NULL){
				count++;
			}
			else{
				N++;
				break;
			}
		}
		if (count == isUnuse.size()){
			cout << str << endl;
			return 0;
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:29: error: 'strstr' was not declared in this scope
   34 |                         if (strstr(str.c_str(), a.c_str()) == NULL){
      |                             ^~~~~~
a.cc:11:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include <cmath>
  +++ |+#include <cstring>
   11 |
Language: C++

typedef struct Combinatorics{

private:
    long long MOD = 1e9 + 7;
    vector<long long> fac, inv_fac;

public:
    Combinatorics(int N, long long MOD = 1e9 + 7): fac(N + 1, 1ll), inv_fac(N + 1, 1ll), MOD(MOD){

        for(int i = 2; i <= N; i ++){
            fac[i] = fac[i - 1] * i % MOD;
            inv_fac[i] = mypow(fac[i], MOD - 2);
        }
    }

    long long C(int n, int k){
        return fac[n] * inv_fac[k] % MOD * inv_fac[n - k] % MOD;
    }

private:
    long long mypow(int x, int k){

        if(k == 0) return 1ll;

        long long t = mypow(x, k / 2);
        long long res = t * t % MOD;
        if(k % 2) res = res * x % MOD;
        return res;
    }
}Comb;

class Solution{

private:
    const long long MOD = 1e9 + 7;

public:
    int ways(int H, int W, int A, int B){

        Combinatorics c(2 * (H + W), MOD);

        long long res = 0ll;
        for(int j = B + 1; j <= W; j ++) {
            long long a = c.C(H - A + j - 2, j - 1);
            long long b = c.C(W - j + 1 + A - 2, A - 1);
            res += a * b % MOD;
            res %= MOD;
        }
        return res;
    }
};

Compiler output:
a.cc:5:5: error: 'vector' does not name a type
    5 |     vector<long long> fac, inv_fac;
      |     ^~~~~~
a.cc: In constructor 'Combinatorics::Combinatorics(int, long long int)':
a.cc:8:52: error: class 'Combinatorics' does not have any field named 'fac'
    8 |     Combinatorics(int N, long long MOD = 1e9 + 7): fac(N + 1, 1ll), inv_fac(N + 1, 1ll), MOD(MOD){
      |                                                    ^~~
a.cc:8:69: error: class 'Combinatorics' does not have any field named 'inv_fac'
    8 |     Combinatorics(int N, long long MOD = 1e9 + 7): fac(N + 1, 1ll), inv_fac(N + 1, 1ll), MOD(MOD){
      |                                                                     ^~~~~~~
a.cc:11:13: error: 'fac' was not declared in this scope
   11 |             fac[i] = fac[i - 1] * i % MOD;
      |             ^~~
a.cc:12:13: error: 'inv_fac' was not declared in this scope
   12 |             inv_fac[i] = mypow(fac[i], MOD - 2);
      |             ^~~~~~~
a.cc: In member function 'long long int Combinatorics::C(int, int)':
a.cc:17:16: error: 'fac' was not declared in this scope
   17 |         return fac[n] * inv_fac[k] % MOD * inv_fac[n - k] % MOD;
      |                ^~~
a.cc:17:25: error: 'inv_fac' was not declared in this scope
   17 |         return fac[n] * inv_fac[k] % MOD * inv_fac[n - k] % MOD;
      |                         ^~~~~~~
Language: C++

   for (int i = B+1; i <= W; ++i) {
      int inc = mul(C(H - A + i - 2, i - 1), C(A + W - i - 1, A - 1));
      res = add(res, inc);
   }


Compiler output:
a.cc:1:4: error: expected unqualified-id before 'for'
    1 |    for (int i = B+1; i <= W; ++i) {
      |    ^~~
a.cc:1:22: error: 'i' does not name a type
    1 |    for (int i = B+1; i <= W; ++i) {
      |                      ^
a.cc:1:30: error: expected unqualified-id before '++' token
    1 |    for (int i = B+1; i <= W; ++i) {
      |                              ^~
Language: C++

/*
 ▓█████▄  ▄████▄  ▓██   ██▓ ██▓███   ██░ ██ ▓█████  ██▀███
▒██▀ ██▌▒██▀ ▀█   ▒██  ██▒▓██░  ██▒▓██░ ██▒▓█   ▀ ▓██ ▒ ██▒
 ░██   █▌▒▓█    ▄   ▒██ ██░▓██░ ██▓▒▒██▀▀██░▒███   ▓██ ░▄█ ▒
 ░▓█▄   ▌▒▓▓▄ ▄██▒  ░ ▐██▓░▒██▄█▓▒ ▒░▓█ ░██ ▒▓█  ▄ ▒██▀▀█▄
 ░▒████▓ ▒ ▓███▀ ░  ░ ██▒▓░▒██▒ ░  ░░▓█▒░██▓░▒████▒░██▓ ▒██▒
  ▒▒▓  ▒ ░ ░▒ ▒  ░   ██▒▒▒ ▒▓▒░ ░  ░ ▒ ░░▒░▒░░ ▒░ ░░ ▒▓ ░▒▓░
  ░ ▒  ▒   ░  ▒    ▓██ ░▒░ ░▒ ░      ▒ ░▒░ ░ ░ ░  ░  ░▒ ░ ▒░
  ░ ░  ░ ░         ▒ ▒ ░░  ░░        ░  ░░ ░   ░     ░░   ░
    ░    ░ ░       ░ ░               ░  ░  ░   ░  ░   ░
  ░      ░         ░ ░
*/
//focus less on how much problem you should solve within a fixed time and focus more on getting the problem solved and
//learning something from it
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define per(i,a,b) for(ll i=a; i>=b; i--)
#define ll long long int
#define ld long double
#define vi vector<ll>
#define vii vector <pair<ll,ll> >
#define sedes set <ll, greater <ll> >
#define seasc set <ll>
#define pb push_back
#define mkp make_pair
#define ff first
#define ss second
constexpr int MOD = 1e9 + 7;
#define prec(n) fixed<<setprecision(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define umap unordered_map<ll, ll>
#define map map<ll, ll>
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define mems(a, i) memset(a, i, sizeof(a))
#define endl '\n'
#define all(v) v.begin(),v.end()
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define printx(x) printf("%lld\n",x);
#define printxy(x,y) cout << x << y <<endl;
#define printxyz(x,y,z) cout << x << y << z <<endl;
#define deba(a) cout << #a << a << endl;
#define debab(a,b) cout << #a << a << #b << b << endl;
vi fac(10000000, 1);
ll power(ll a, ll n)
{
	ll res = 1;
	while (n > 0)
	{
		if (n % 2 == 0)
			a = ((a % MOD) * (a % MOD)) % MOD, n /= 2;
		else
			res = ((res % MOD) * (a % MOD)) % MOD , n--;
	}
	return res % MOD;
}
ll C(ll n , ll k)
{
	if (k > n) return 0;
	ll res = F[n];
	res = (res * power(F[k], MOD - 2)) % MOD; //inverse of K = power(F[k],MOD-2)
	res = (res * power(F[n - k], MOD - 2)) % MOD; //inverse of N-K = power(F[N-K],MOD-2)
	return res % MOD;
}
int main()
{
	fast;
	ll n, m, a, b;
	cin >> n >> m >> a >> b;


	rep(i, 1, n + m + 1)
	fac[i] = ((i * fac[i - 1]) % MOD) % MOD;

	ll ans = 0;
	for (int i = b; i < m; i++)
	{
		ll x = n - a - 1;
		ll y = i;
		ll x2 = a - 1;
		ll y2 = m - i - 1;
		ll p = (C(x + y, x) % MOD * C(x2 + y2, x2) % MOD) % MOD;
		ans = (ans + p) % MOD;
	}
	cout << ans % MOD << endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:63:18: error: 'F' was not declared in this scope
   63 |         ll res = F[n];
      |                  ^
Language: C++

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

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
 
	int mod = 1e9+7;
	int h, w, a, b;
	cin >> h >> w >> a >> b;
	vector<vector<ll>> dp(h, vector<ll>(w));
	dp[0][0] = (a < h ? 1ll : 0);
	for(int i=0; i<h; i++){
		for(int j=0; j<w; j++){
			if(i||j)
				dp[i][j] = (h-i<=a && j<b? 0ll: ((i? dp[i-1][j]: 0ll) + (j? dp[i][j-1]: 0ll))%mod);
		}
	}
	cout << dp[h-1][w-1] << '\n';
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'll' was not declared in this scope
   12 |         vector<vector<ll>> dp(h, vector<ll>(w));
      |                       ^~
a.cc:12:23: error: template argument 1 is invalid
a.cc:12:23: error: template argument 2 is invalid
a.cc:12:25: error: template argument 1 is invalid
   12 |         vector<vector<ll>> dp(h, vector<ll>(w));
      |                         ^~
a.cc:12:25: error: template argument 2 is invalid
a.cc:12:43: error: template argument 2 is invalid
   12 |         vector<vector<ll>> dp(h, vector<ll>(w));
      |                                           ^
a.cc:12:47: error: expression list treated as compound expression in initializer [-fpermissive]
   12 |         vector<vector<ll>> dp(h, vector<ll>(w));
      |                                               ^
a.cc:13:11: error: invalid types 'int[int]' for array subscript
   13 |         dp[0][0] = (a < h ? 1ll : 0);
      |           ^
a.cc:17:35: error: invalid types 'int[int]' for array subscript
   17 |                                 dp[i][j] = (h-i<=a && j<b? 0ll: ((i? dp[i-1][j]: 0ll) + (j? dp[i][j-1]: 0ll))%mod);
      |                                   ^
a.cc:17:72: error: invalid types 'int[int]' for array subscript
   17 |                                 dp[i][j] = (h-i<=a && j<b? 0ll: ((i? dp[i-1][j]: 0ll) + (j? dp[i][j-1]: 0ll))%mod);
      |                                                                        ^
a.cc:17:95: error: invalid types 'int[int]' for array subscript
   17 |                                 dp[i][j] = (h-i<=a && j<b? 0ll: ((i? dp[i-1][j]: 0ll) + (j? dp[i][j-1]: 0ll))%mod);
      |                                                                                               ^
a.cc:20:19: error: invalid types 'int[int]' for array subscript
   20 |         cout << dp[h-1][w-1] << '\n';
      |                   ^
Language: C

#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long long modpow(long long x, long long y, long long n) {
    long long res = 1;
    x%=n;
    while (y>0) {
        if (y%2==1) {
            res*=x;
            res%=n;
        }
        y/=2;
        x*=x;
        x%=n;
    }
    return res;
}
int main() {
    vector<long long> facts(200001), invs(200001);
    facts[0] = 1;
    invs[0] = 1;
    for (long long i=1; i<=200000; i++) {
        facts[i] = facts[i-1]*i%MOD;
        invs[i] = modpow(facts[i],MOD-2,MOD);
    }
    long long h, w, a, b;
    cin >> h >> w >> a >> b;
    long long res = 0;
    long long mult = 1;
    for (long long i=0; i<h-a; i++) {
        mult = facts[b-1+i]*invs[i]%MOD;
        mult*=invs[b-1];
        mult%=MOD;
        mult*=facts[h-i+w-b-2];
        mult%=MOD;
        mult*=invs[h-1-i];
        mult%=MOD;
        mult*=invs[w-b-1];
        mult%=MOD;
        res+=mult;
    }
    cout << res;
    return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;

typedef long long ll;
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define REP(i,l,r) for(int i=l;i>=r;i--)
#define fi first
#define se second
#define eb emplace_back
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

#define int ll
const int mod = 1e9+7 ;

int n,m,a,b;
int fft[200007], fft_sz = 1;
int fact(const int& n){
	for(n > fft_sz; ++fft_sz) fft[fft_sz+1] = (fft[fft_sz]*(fft_sz+1)) % mod;
	return fft[n];
}
int mul (const int& a, const int& b){
	return a * b %mod;
}
int mi(const int& a, const int& b){
	int ans = (a-b) % mod;
	return (ans < 0 ? ans + mod : ans);
}
int binpow(int a, int b){
	int res = 1;
	while(b){
		if (b & 1) res = mul(res,a);
		a = mul(a,a), b >>= 1;
	}
	return res;
}
int divide(const int& a, const int& b){
	assert(b > 0);
	return mul(a,binpow(b,mod-2)); 
}
int c(const int& a, const int& b){
	assert(b >= a);
	return divide(fact(b), mul(fact(a), fact(b-a)));
}
int path0(const int& n, const int& m){
	return c(n-1, n+m-2);
}
int path(const int& r, const int& c, const int& row, const int& col){
	return path0(row-r+1, col-c+1);
}

signed main() {
	fastio ;
	fft[0] = fft[1] = 1LL;
	cin >> n >> m >> a >> b;
	int ans = path0(n,m);
	for(int i = 0, r = n, c = b; i < a; ++i, --r){
		ans = mi(ans, mul(path(1,1 ,r,c), path(r,c+1, n,m)));
	}
	cout << (ans % mod) << endl;
}



Compiler output:
a.cc: In function 'll fact(const ll&)':
a.cc:20:33: error: expected ';' before ')' token
   20 |         for(n > fft_sz; ++fft_sz) fft[fft_sz+1] = (fft[fft_sz]*(fft_sz+1)) % mod;
      |                                 ^
      |                                 ;
Language: C++

#include <iostream>

using namespace std;

#define mod 1000000007

long long fact[1000005];
fact[0] = 1;

void precompute()	{
	for (int i = 1; i < 1000000; i++)	{
      	fact[i] = (i * (fact[i - 1] % mod)) % mod;
    }
}

long long power(int x, int y, int m)	{
	if (y == 0)
      	return 1;
  	long long p = (power(x, y / 2, m) % m);
  	p = ((p % m) * (p % m)) % m;
  	if (y % 2 == 0)
      	return p;
 	else
      	return ((x % m) * (p % m)) % m;
}

long long modinv(long long int x)	{
	return power(x, m - 2, m);
}

int main()	{
  	long long h, w, a, b;
  	precompute();
  	cin >> h >> w >> a >> b;
  	long long result = 0;
  	for (int i = 0; i <= w - b - 1; i++)	{
    	long long temp1 = ((fact[h - a + b + i - 1]) * modinv(fact[b + i]) % mod * modinv(fact[h - a - 1]) % mod) % mod;
      	long long temp2 = ((fact[w - b - i + a - 2]) * modinv(fact[w - b - 1 - i]) % mod * modinv(fact[a - 1]) % mod) % mod;
		long long temp += ((temp1 % mod) * (temp2 % mod)) % mod; 
     	result = ((result % mod) + (temp % mod)) % mod;
    }
  	cout << result % mod << endl;
  	return 0;
}

Compiler output:
a.cc:8:1: error: 'fact' does not name a type
    8 | fact[0] = 1;
      | ^~~~
a.cc: In function 'long long int modinv(long long int)':
a.cc:28:25: error: 'm' was not declared in this scope
   28 |         return power(x, m - 2, m);
      |                         ^
a.cc: In function 'int main()':
a.cc:39:32: error: expected initializer before '+=' token
   39 |                 long long temp += ((temp1 % mod) * (temp2 % mod)) % mod;
      |                                ^~
a.cc:40:37: error: 'temp' was not declared in this scope; did you mean 'temp2'?
   40 |         result = ((result % mod) + (temp % mod)) % mod;
      |                                     ^~~~
      |                                     temp2
Language: C++

#include <iostream>

using namespace std;

long long npaths(int rows, int cols)	{
	if (rows == 1 || cols == 1)	{
    	return 1;
    }
  	return ((npaths(rows - 1, cols) % 1000000007) + (npaths(rows, cols - 1) % 1000000007)) % 1000000007 << endl;
}

int main()	{
	long long h, w, a, b;
  	cin >> h >> w >> a >> b;
  	cout << ((npaths(h, w) % 1000000007) - (npaths(a, b) % 1000000007)) % 1000000007 << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'long long int npaths(int, int)':
a.cc:9:109: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |         return ((npaths(rows - 1, cols) % 1000000007) + (npaths(rows, cols - 1) % 1000000007)) % 1000000007 << endl;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
using ll = long long;

const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 5;

ll modpow(ll a, ll b) {
  ll res = 1;
  while (b) {
    if (b&1)
      res = (res * a) % MOD;
    a = (a * a) % MOD;
    b >>= 1;
  }
  return res;
}

ll f[MAXN];
ll invf[MAXN];

ll ncr(ll n, ll r) {
  if (r == 0 || n == r) return 1;
  return (((f[n] * invf[n-r]) % MOD) * invf[r]) % MOD;
}

int main() {
  int h, w, a, b;
  cin >> h >> w >> a >> b;
  f[0] = 1;
  for (int i = 1; i < MAXN; i++) {
    f[i] = (f[i-1] * i) % MOD;
    invf[i] = modpow(f[i], MOD-2);
  }
  ll res = 0;
  for (int i = b; i < w; i++) {
    int y1 = h - a - 1, x1 = i;
    int y2 = a - 1, x2 = w - i - 1;
    ll p = (ncr(x1 + y1, x1) * ncr(x2 + y2, x2)) % MOD;
    res = (res + p) % MOD;
  }
  cout << res << '\n';
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:29:3: error: 'cin' was not declared in this scope
   29 |   cin >> h >> w >> a >> b;
      |   ^~~
a.cc:42:3: error: 'cout' was not declared in this scope
   42 |   cout << res << '\n';
      |   ^~~~
Language: C++

#include <stdio.h>
int H,W,A,B;
int res;
bool grid[100001][100001];

void recurse(int row,int col)
{
	//base case 1
	if (row==H && col==W)
	{
		res++;
		break;
	}

	//base case 2
	if (grid[row][col]==false)
		break;

	//recursive calls
	else
	{
		if (grid[row+1][col]==true && grid[row+1][col]<=H)
			recurse(row+1,col);
		if (grid[row][col+1]==true && grid[row][col+1]<=W)
			recurse(row,col+1);
	}
}

int main()
{
	scanf("%d %d %d %d",&H,&W,&A,&B);

	for (int i=1;i<=H;i++)
	{
		for (int j=1;j<=W;j++)
		{
			grid[i][j] = true;
		}
	}

	for (int i=H;i>=H-A;i--)
	{
		for (int j=W;j>=W-B;j--)
		{
			grid[i][j] = false;
		}
	}
	recurse(1,1)

	printf("%d",res);

}


Compiler output:
a.cc: In function 'void recurse(int, int)':
a.cc:12:17: error: break statement not within loop or switch
   12 |                 break;
      |                 ^~~~~
a.cc:17:17: error: break statement not within loop or switch
   17 |                 break;
      |                 ^~~~~
a.cc: In function 'int main()':
a.cc:48:21: error: expected ';' before 'printf'
   48 |         recurse(1,1)
      |                     ^
      |                     ;
   49 | 
   50 |         printf("%d",res);
      |         ~~~~~~
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long h = Integer.parseInt(sc.next());
    long w = Integer.parseInt(sc.next());
    long a = Integer.parseInt(sc.next());
    long b = Integer.parseInt(sc.next());
    long mod = 1000000007l;
    
    long[] factorialArray = new long[(int)h+w];
    factorialArray[0] = 1l;
    for(long i=1l; i<h+w; i++){
      factorialArray[(int)i] *= i%mod*factorialArray[(int)i-1]%mod;
    }
    
    long total = 0l;
    for(long i=b; i<w; i++){
      total += comb(i+h-a-1l, i, factorialArray, mod)*comb(-i+w-2l+a, a-1l, factorialArray, mod);
      total %= mod;
    }
    System.out.println(total);
  }
  
  private static long power(long n, long pow, long mod){
    if(pow == 0l){
      return 1l;
    }else if(pow == 1l){
      return n;
    }else{
      if(pow%2 == 0l){
        return power(n, pow/2l, mod)*power(n, pow/2l, mod)%mod;
      }else{
        return power(n, pow/2l, mod)*power(n, pow/2l, mod)%mod*n%mod;
      }
    }
  }
  
  private static long comb(long n, long k, long[] array, long mod){
    return array[(int)n]/power(array[(int)k], mod-2l, mod)%mod/power(array[(int)(n-k)], mod-2l, mod)%mod;
  }
}

Compiler output:
Main.java:12: error: incompatible types: possible lossy conversion from long to int
    long[] factorialArray = new long[(int)h+w];
                                           ^
1 error
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long h = Integer.parseInt(sc.next());
    long w = Integer.parseInt(sc.next());
    long a = Integer.parseInt(sc.next());
    long b = Integer.parseInt(sc.next());
    long mod = 1000000007l;
    
    long[] factorialArray = new long[h+w];
    factorialArray[0] = 1l;
    for(long i=1l; i<h+w; i++){
      factorialArray[i] *= i%mod*factorialArray[i-1l]%mod;
    }
    
    long total = 0l;
    for(long i=b; i<w; i++){
      total += comb(i+h-a-1l, i, factorialArray, mod)*comb(-i+w-2l+a, a-1l, factorialArray, mod);
      total %= mod;
    }
    System.out.println(total);
  }
  
  private static long power(long n, long pow, long mod){
    if(pow == 0l){
      return 1l;
    }else if(pow == 1l){
      return n;
    }else{
      if(pow%2 == 0l){
        return power(n, pow/2l, mod)*power(n, pow/2l, mod)%mod;
      }else{
        return power(n, pow/2l, mod)*power(n, pow/2l, mod)%mod*n%mod;
      }
    }
  }
  
  private static long comb(long n, long k, long[] array, long mod){
    return array[n]/power(array[k], mod-2l, mod)%mod/power(array[n-k], mod-2l, mod)%mod;
  }
}

Compiler output:
Main.java:12: error: incompatible types: possible lossy conversion from long to int
    long[] factorialArray = new long[h+w];
                                      ^
Main.java:15: error: incompatible types: possible lossy conversion from long to int
      factorialArray[i] *= i%mod*factorialArray[i-1l]%mod;
                     ^
Main.java:15: error: incompatible types: possible lossy conversion from long to int
      factorialArray[i] *= i%mod*factorialArray[i-1l]%mod;
                                                 ^
Main.java:41: error: incompatible types: possible lossy conversion from long to int
    return array[n]/power(array[k], mod-2l, mod)%mod/power(array[n-k], mod-2l, mod)%mod;
                 ^
Main.java:41: error: incompatible types: possible lossy conversion from long to int
    return array[n]/power(array[k], mod-2l, mod)%mod/power(array[n-k], mod-2l, mod)%mod;
                                ^
Main.java:41: error: incompatible types: possible lossy conversion from long to int
    return array[n]/power(array[k], mod-2l, mod)%mod/power(array[n-k], mod-2l, mod)%mod;
                                                                  ^
6 errors
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long h = Integer.parseInt(sc.next());
    long w = Integer.parseInt(sc.next());
    long a = Integer.parseInt(sc.next());
    long b = Integer.parseInt(sc.next());
    long mod = 1000000007l;
    
    long total = 0l;
    for(long i=b; i<w; i++){
      total += factorial(i+h-a-1l, i, mod)*power(factorial(h-a-1l, 1l, mod), mod-2l, mod)%mod
        *factorial(-i+w-2l+a, a-1l, mod)*power(factorial(w-1l-i, 1l, mod), mod-2l, mod)%mod;
    
    System.out.println(total);
  }
  
  private static long power(long n, long pow, long mod){
    long now_pow = 1l;
    long now = n%mod;
    long save = 1l;
    while(true){
      if(pow == 1l){
        return save*now%mod;
      }else if(now_pow*2l < pow){
        now *= now;
        now %= mod;
        now_pow *= 2l;
      }else if(now_pow*2l == pow){
        now *= now;
        now %= mod;
        return save*now%mod;
      }else{
        save *= now;
        save %= mod;
        now = n;
        now %= mod;
        pow -= now_pow;
        now_pow = 1l;
      }
    }
  }
  
  private static long factorial(long start, long stop, long mod){
    long r = 1l;
    for(long i=start; stop<i; i--){
      r *= i%mod;
      r %= mod;
    }
    return r;
  }
}

Compiler output:
Main.java:20: error: illegal start of expression
  private static long power(long n, long pow, long mod){
  ^
1 error
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long h = Integer.parseInt(sc.next());
    long w = Integer.parseInt(sc.next());
    long a = Integer.parseInt(sc.next());
    long b = Integer.parseInt(sc.next());
    long mod = 1000000007l;
    
    long total = factorial(h+w-2l, h-1l, mod)*power(factorial(w-1l, 1l, mod), mod-2l, mod);
    long fbd = 0l;
    for(long i=h-a; i<=h-1l; i++){
      fbd -= factorial(i+b-1l, i, mod)*power(factorial(b-1l, 1l, mod), mod-2l, mod)%mod*factorial(w-b+h-i-1l, w-b, mod)*power(factorial(h-i-1l, 1l, mod), mod-2l, mod)%mod;
      fbd %= mod;
    }
    if(total+fbd < 0){
      fbd += mod;
    }
    
    System.out.println(total+fbd);
  }
  
  private static long power(long n, long pow, long mod){
    long now_pow = 1l;
    long now = n%mod;
    long save = 1l;
    while(true){
      if(pow == 1l){
        return save*now%mod;
      }else if(now_pow*2l < pow){
        now *= now;
        now %= mod;
        now_pow *= 2l;
      }else if(now_pow*2l == pow){
        now *= now;
        now %= mod;
        return save*now%mod;
      }else{
        save *= now;
        save %= mod;
        now = n;
        now %= mod;
        pow -= now_pow;
        now_pow = 1l;
      }
    }
  }
  
  private static long factorial(long start, long stop, long mod){
    long r = 1l;
    for(long i=start; stop<=i; i--){
      r *= i%mod;
      r %= mod;
    }
    return r;
}

Compiler output:
Main.java:58: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int h = Integer.parseInt(sc.next());
    int w = Integer.parseInt(sc.next());
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int modnum = 1000000007;
    
    int total = modFactorial(h-w-2, h-1)*modFactorial(h-w-2, w-1)/modFactorial(h-w-2, 1)%modnum;
    for(int i=h-a; i<h; i++){
      int f = modFactorial(i+b-1, h-a)*modFactorial(i+b-1,b-1)/modFactorial(i+b-a, 1)%modnum
        *modFactorial(h-i-1+w-b, h-i-1)*modFactorial(h-i-1+w-b, w-b)/modFactorial(h-i-1+w-b, 1)%modnum;
      total -= f;
    }
    
    System.out.println(total);
  }
  
  private static int modFactorial(int n, int stop){
    int = r
    for(int i=stop; i<=n; i++){
      r *= i%1000000007;
    }
    return r;
  }
}

Compiler output:
Main.java:23: error: not a statement
    int = r
    ^
Main.java:23: error: ';' expected
    int = r
       ^
Main.java:23: error: not a statement
    int = r
          ^
Main.java:23: error: ';' expected
    int = r
           ^
4 errors
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int h = Integer.parseInt(sc.next());
    int w = Integer.parseInt(sc.next());
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int modnum = 1000000007;
    
    int total = modFactorial(h-w-2, h-1)*modFactorial(h-w-2, w-1)/modFactorial(h-w-2)%modnum;
    for(int i=h-a; i<h; i++){
      int f = modFactorial(i+b-1, h-a)*modFactorial(i+b-1,b-1)/modFactorial(i+b-a, 1)%modnum
        *modFactorial(h-i-1+w-b, h-i-1)*modFactorial(h-i-1+w-b, w-b)/modFactorial(h-i-1+w-b, 1)%modnum;
      total -= f;
    }
    
    System.out.println(total);
  }
  
  private static int modFactorial(int n, int stop){
    if(n == 1){
      return 1;
    }else if(n == stop+1){
      return n%1000000007;
    }else{
      return modFactorial(n-1, 1)*(n%1000000007);
    }
  }
}

Compiler output:
Main.java:12: error: method modFactorial in class Main cannot be applied to given types;
    int total = modFactorial(h-w-2, h-1)*modFactorial(h-w-2, w-1)/modFactorial(h-w-2)%modnum;
                                                                  ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int h = Integer.parseInt(sc.next());
    int w = Integer.parseInt(sc.next());
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int modnum = 1000000007;
    
    int r = modFactorial(h-a+b, h-a)%modnum*modFactorial(h-a+b, b)%modnum/modFactorial(h-a+b, 1);
    r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
    
    System.out.println(r);
  }
  
  private static int modFactorial(int n, int stop){
    if(n == 1){
      return 1;
    }else if(n == stop+1){
      return n%1000000007;
    }else{
      return modFactorial(n-1)*(n%1000000007);
    }
  }
}

Compiler output:
Main.java:13: error: method modFactorial in class Main cannot be applied to given types;
    r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
                                                                        ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
Main.java:24: error: method modFactorial in class Main cannot be applied to given types;
      return modFactorial(n-1)*(n%1000000007);
             ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
2 errors
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int h = Integer.parseInt(sc.next());
    int w = Integer.parseInt(sc.next());
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int modnum = 1000000007;
    
    int r = modFactorial(h-a+b, h-a)%modnum*modfactorial(h-a+b, b)%modnum/modFactorial(h-a+b, 1);
    r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
    
    System.out.println(r);
  }
  
  private static int modFactorial(int n, int stop){
    if(n == 1){
      return 1;
    }else if(n == stop+1){
      return n%1000000007;
    }else{
      return modFactorial(n-1)*(n%1000000007);
    }
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
    int r = modFactorial(h-a+b, h-a)%modnum*modfactorial(h-a+b, b)%modnum/modFactorial(h-a+b, 1);
                                            ^
  symbol:   method modfactorial(int,int)
  location: class Main
Main.java:13: error: method modFactorial in class Main cannot be applied to given types;
    r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
                                                                        ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
Main.java:24: error: method modFactorial in class Main cannot be applied to given types;
      return modFactorial(n-1)*(n%1000000007);
             ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
3 errors
Language: Java

import java.util.Scanner;

calss Main{
  public static void main(String[] args){
    Scanner sc = new Scanner();
    int h = Integer.parseInt(sc.next());
    int w = Integer.parseInt(sc.next());
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int modnum = 1000000007;
    
    int r = modFactorial(h-a+b, h-a)%modnum*modfactorial(h-a+b, b)%modnum/modFactorial(h-a+b, 1);
    r = r*modFactorial(w+a-b, a)%modnum*modFactorial(w+a-b, w-b)%modnum/modFactorial(w+a-b);
    
    System.out.println(r);
  }
  
  private static int modFactorial(int n, int stop){
    if(n == 1){
      return 1;
    }else if(n == stop+1){
      return n%1000000007;
    }else{
      return modFactorial(n-1)*(n%1000000007);
    }
  }

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
calss Main{
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args){
                ^
  (use --enable-preview to enable unnamed classes)
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define mod 1e9+7

int main()
{
  int h,w,a,b;
  cin>>h>>w>>a>>b;
  int dp[h][w];
  memset(dp,-1,sizeof(dp));
  for (int i=h-a;i<h;i++)
  {
    for (int j=0;j<b;j++)
    {
      dp[i][j]=0;
    }
  }
  for (int i=0;i<h;i++)
  {
    if (dp[i][0]==-1)
    {
      dp[i][0]=1;
    }
  }
  for (int i=0;i<w;i++)
  {
    dp[0][i]=1;
  }
  for (int i=1;i<h;i++)
  {
    for (int j=1;j<w;j++)
    {
      if (dp[i][j]!=0)
      {
        dp[i][j]=((dp[i-1][j]%mod)+(dp[i][j-1]%mod))%mod;
      }
    }
  }
  cout<<dp[h-1][w-1];

}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:30: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   35 |         dp[i][j]=((dp[i-1][j]%mod)+(dp[i][j-1]%mod))%mod;
      |                    ~~~~~~~~~~^
      |                             |
      |                             int
a.cc:35:47: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   35 |         dp[i][j]=((dp[i-1][j]%mod)+(dp[i][j-1]%mod))%mod;
      |                                     ~~~~~~~~~~^
      |                                              |
      |                                              int
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int h,w,a,b;
  int dp[h][w];
  memset(dp,-1,sizeof(dp));
  for (int i=h-a;i<h;i++)
  {
    for (int j=0;j<b;j++)
    {
      dp[i][j]=0;
    }
  }
  for (int i=0;i<h;i++)
  {
    if (dp[i][0]==-1)
    {
      dp[i][0]=1;
    }
  }
  for (int i=0;i<w;i++)
  {
    dp[0][i]=1;
  }
  for (int i=1;i<h;i++)
  {
    for (int j=1;j<w;j++)
    {
      if (dp[i][j]!=0)
      {
        dp[i][j]=dp[i-1][j]+dp[i][j-1];
      }
    }
  }
  cout<<dp[h-1][w-1];
  

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: expected '}' at end of input
   36 |   cout<<dp[h-1][w-1];
      |                      ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^