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

#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1000100000;
const long long MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
// 二項係数計算
long long COM(long long n, long long k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
 
 
int main(){
  COMinit();
  long long n,a,b;
  cin>>n>>a>>b;
  long long ans=modpow(2,n,MOD)-1;
  
  ans-=(COM(n,a)+COM(n,b));
   ans%=MOD;
  if(ans<0) ans+=MOD;
  cout<<ans<<endl;
}

Compiler output:
/tmp/ccfpNFGY.o: in function `COMinit()':
a.cc:(.text+0x20): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0xdd): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x143): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x176): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x1c5): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
/tmp/ccfpNFGY.o: in function `COM(long long, long long)':
a.cc:(.text+0x240): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccfpNFGY.o
a.cc:(.text+0x25b): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
       return num; };
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
       return nume; };
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:10: error: cannot find symbol
            num = num * (n - i + 1) / i;
            ^
  symbol:   variable num
  location: class Main
Main.java:10: error: cannot find symbol
            num = num * (n - i + 1) / i;
                  ^
  symbol:   variable num
  location: class Main
Main.java:11: error: incompatible types: unexpected return value
       return num; };
              ^
Main.java:13: error: cannot find symbol
            nume = nume * (n - i + 1) / i;
            ^
  symbol:   variable nume
  location: class Main
Main.java:13: error: cannot find symbol
            nume = nume * (n - i + 1) / i;
                   ^
  symbol:   variable nume
  location: class Main
Main.java:14: error: incompatible types: unexpected return value
       return nume; };
              ^
Main.java:15: error: cannot find symbol
    int d = c - num - nume;
                ^
  symbol:   variable num
  location: class Main
Main.java:15: error: cannot find symbol
    int d = c - num - nume;
                      ^
  symbol:   variable nume
  location: class Main
8 errors
Language: C++

#include <iostream>
using namespace std;
const int mod = 1e9 + 7;
long long factorial(int x)
{
    if(x == 0 || x == 1)
        return 1;
    else
        return x * factorial(x - 1);
}
int main()
{
  int i = 1;
  long long n, a, b, ans;
  cin >> n >> a >> b;
  do{
    if(i != a || i != b)
      ans += factorial(n) / (factorial(i) * factorial(n - i));
      i++;
  }(while i <= n);
  cout << ans % mod;
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:20:4: error: expected 'while' before '(' token
   20 |   }(while i <= n);
      |    ^
a.cc:20:5: error: expected primary-expression before 'while'
   20 |   }(while i <= n);
      |     ^~~~~
a.cc:20:5: error: expected ')' before 'while'
   20 |   }(while i <= n);
      |    ~^~~~~
      |     )
a.cc:20:5: error: expected ';' before 'while'
   20 |   }(while i <= n);
      |     ^~~~~
      |     ;
a.cc:20:11: error: expected '(' before 'i'
   20 |   }(while i <= n);
      |           ^
      |           (
Language: C++

#include <iostream>
#include <map>
 
long long combi(long long n, long long k) {
  std::map<std::string, long long> memo;
  if (n == k || k == 0)
    return 1;
  else {
    std::string key = std::to_string(n) + std::to_string(k);
    if (memo.count(key) != 0) {
      return memo[key];
    } else {
      ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      memo[key] = out;
      return out;
    }
  }
}
 
int main() {
  long long n, a, b;
  long long sum = 0l;
  std::cin >> n >> a >> b;
  
  for (long long i = 1; i <= n; i++) {
    if (i == a || i == b) {
      continue;
    }
    sum += combi(n, i);
  }
  
  std::cout << sum;
  
  return 0;
}

Compiler output:
a.cc: In function 'long long int combi(long long int, long long int)':
a.cc:13:7: error: 'll' was not declared in this scope
   13 |       ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      |       ^~
a.cc:14:19: error: 'out' was not declared in this scope
   14 |       memo[key] = out;
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
  
int main(){

long long int n,a,b,c1=1,c2=1,n1,n2;
  cin>>n>>a>>b;
   long long int t1 = a,t2=b;
  n1=n;
  n2=n;
 int1024_t arr[n+1],sum=0;
  arr[0]=0;
  for(int i=1;i<n+1;i++){
  arr[i] = (2*arr[i-1])+1;
  }
  
  while(t1){
  n1*=t1;
    t1--;
  }
  while(t2){
  n2*=t2;
    t2--;
  }
  while(a!=1){
  c1*=a;
    a--;
  }
  while(b!=1){
  c2*=b;
    b--;
  }
  
  sum=arr[n]-(n1/c1)-(n2/c2);
  1024_t deno=1000000007;
  
  cout<<(sum%deno)<<endl;

}


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

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

int kaijo(int x) {
  int m = 1;
  for (int i = 0; i < x; i++) {
    m *= (i + 1);
  return m;
}

int main() {
  int n, a, b;
  cin >> n >> a >> b;
  
  int nCa = kaijo(n) / ( kaijo(a) * kaijo(n-a) );
  int nCb = kaijo(n) / ( kaijo(b) * kaijo(n-b) );
  int kaijo2 = 1;
  for (int k = 0; k < n; k++) {
    kaijo2 *= 2;
  }
  int sum = (kaijo2 - 1 - (nCa + nCb)) % 1000000007;
  cout << sum << endl; 
}

Compiler output:
a.cc: In function 'int kaijo(int)':
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main() {
      |         ^~
a.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main() {
      |         ^~
      |         --
a.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:12: error: a function-definition is not allowed here before '{' token
   11 | int main() {
      |            ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:18: note: to match this '{'
    4 | int kaijo(int x) {
      |                  ^
a.cc:23:2: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
map<int,int> memo;
int main() {
  int N,a,b;
  cin>>N,a,b;
  int sum=0;
  for(int j=0;j<N+1;j++){
    int s;
    s=(j+1+N)*(N-j-1)/2;
    sum=sum+s;
  }
 
  int s1=1;
  s1=(a+N)(N-a)/2;
  sum=sum-s1;
  int s2=1;
  s2=(b+N)(N-b)/2;
  sum=sum-s2;
  
  sum=sum%(1000000000+7);
  cout<<sum<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: expression cannot be used as a function
   15 |   s1=(a+N)(N-a)/2;
      |      ~~~~~^~~~~
a.cc:18:11: error: expression cannot be used as a function
   18 |   s2=(b+N)(N-b)/2;
      |      ~~~~~^~~~~
Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
  
int main(){

long long int n,a,b,c1=1,c2=1,n1,n2;
  cin>>n>>a>>b;
   long long int t1 = a,t2=b;
  n1=n;
  n2=n;
 int1024_t arr[n+1],sum=0;
  arr[0]=0;
  for(int i=1;i<n+1;i++){
  arr[i] = (2*arr[i-1])+1;
  }
  
  while(t1){
  n1*=t1;
    t1--;
  }
  while(t2){
  n2*=t2;
    t2--;
  }
  while(a!=1){
  c1*=a;
    a--;
  }
  while(b!=1){
  c2*=b;
    b--;
  }
  
  sum=arr[n]-(n1/c1)-(n2/c2);
  int 1024_t deno=1000000007;
  
  cout<<(sum%deno)<<endl;

}


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

#include <iostream>
 
long long combi(long long n, long long k) {
  std::map<std::string, long long> memo;
  if (n == k || k == 0)
    return 1;
  else {
    std::string key = std::to_string(n) + std::to_string(k);
    if (memo.count(key) != 0) {
      return memo[key];
    } else {
      ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      memo[key] = out;
      return out;
    }
  }
}
 
int main() {
  long long n, a, b;
  long long sum = 0l;
  std::cin >> n >> a >> b;
  
  for (long long i = 1; i <= n; i++) {
    if (i == a || i == b) {
      continue;
    }
    sum += combi(n, i);
  }
  
  std::cout << sum;
  
  return 0;
}

Compiler output:
a.cc: In function 'long long int combi(long long int, long long int)':
a.cc:4:8: error: 'map' is not a member of 'std'
    4 |   std::map<std::string, long long> memo;
      |        ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | 
a.cc:4:23: error: expected primary-expression before ',' token
    4 |   std::map<std::string, long long> memo;
      |                       ^
a.cc:4:25: error: expected primary-expression before 'long'
    4 |   std::map<std::string, long long> memo;
      |                         ^~~~
a.cc:9:9: error: 'memo' was not declared in this scope
    9 |     if (memo.count(key) != 0) {
      |         ^~~~
a.cc:12:7: error: 'll' was not declared in this scope
   12 |       ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      |       ^~
a.cc:13:19: error: 'out' was not declared in this scope
   13 |       memo[key] = out;
      |                   ^~~
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num ;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
       return num; };
    int nume ;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
       return nume; };
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:12: error: incompatible types: unexpected return value
       return num; };
              ^
Main.java:16: error: incompatible types: unexpected return value
       return nume; };
              ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i = 0; i < (n); i++)

void comb(vector<vector <long long int> > &v){
  for(int i = 0;i <v.size(); i++){
    v[i][0]=1;
    v[i][i]=1;
  }
  for(int k = 1;k <v.size();k++){
    for(int j = 1;j<k;j++){
      v[k][j]=(v[k-1][j-1]+v[k-1][j]);
    }
  }
}

int power(int A){
    int i = 1;
    for(int i = 0; i < A; i++){
        i = (i * 2 % 1000000007);
    }
    return i - 1;
}

int main(){
    int64_t n,a,b;
    cin >> n >> a >> b;
    int ans = power(n);
    vector<vector<long long int> > na(N+1,vector<long long int>(N+1,0));
    vector<vector<long long int> > nb(N+1,vector<long long int>(N+1,0));
    comb(na);
    comb(nb);
    na[n][a] %= 1000000007;
    nb[n][b] %= 1000000007;
    cout << ans - na[n][a] - nb[n][b] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:39: error: 'N' was not declared in this scope
   30 |     vector<vector<long long int> > na(N+1,vector<long long int>(N+1,0));
      |                                       ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a,b;
	cin>>a>>b;
	long long sum = 0;
	for(long long i=1;i<=n;i++)
	{
		if(i!=a&&i!=b)
		{
			if(i == 1)
				sum+=n,continue;
			else
				sum+=(n-i+1)*(n-i+2)/2;
		}
	} 
	cout<<sum<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:40: error: expected primary-expression before 'continue'
   15 |                                 sum+=n,continue;
      |                                        ^~~~~~~~
Language: C++

#include <stdlib.h>
#include <iostream.h>
std::vector<std::vector<long long>> comb(int n, int r) {
  std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}
int n, a, b;
cin >> n >> a >> b;
cout << fmod(pow(2,n) -1 -comb(n,a) -comb(n,b), 10e9+7);

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

#include <iostream>

using namespace std;

long long combi(long long n, long long k) {
  std::map<std::string, long long> memo;
  if (n == k || k == 0)
    return 1;
  else {
    std::string key = std::to_string(n) + std::to_string(k);
    if (memo.count(key) != 0) {
      return memo[key];
    } else {
      ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      memo[key] = out;
      return out;
    }
  }
}

int main() {
  long long n, a, b;
  long long sum = 0l;
  cin >> n >> a >> b;
  
  for (long long i = 1; i <= n; i++) {
    if (i == a || i == b) {
      continue;
    }
    sum += combi(n, i);
  }
  
  cout << sum;
  
  return 0;
}

Compiler output:
a.cc: In function 'long long int combi(long long int, long long int)':
a.cc:6:8: error: 'map' is not a member of 'std'
    6 |   std::map<std::string, long long> memo;
      |        ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | 
a.cc:6:23: error: expected primary-expression before ',' token
    6 |   std::map<std::string, long long> memo;
      |                       ^
a.cc:6:25: error: expected primary-expression before 'long'
    6 |   std::map<std::string, long long> memo;
      |                         ^~~~
a.cc:11:9: error: 'memo' was not declared in this scope
   11 |     if (memo.count(key) != 0) {
      |         ^~~~
a.cc:14:7: error: 'll' was not declared in this scope
   14 |       ll out = combi(n - 1, k - 1) + combi(n - 1, k);
      |       ^~
a.cc:15:19: error: 'out' was not declared in this scope
   15 |       memo[key] = out;
      |                   ^~~
Language: C++

#include<iostream>
#include<vector>
#include <cstdint>
#include <math.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
ll m, a, b;
// uintmax_t combination(unsigned int, unsigned int);
void comb(vector<vector <long long int> > &v, ll max){
  for(int i = 0;i <v.size(); i++){
    v[i][0]=1;
    v[i][i]=1;
  }
  for(int k = 1;k <v.size();k++){
    for(int j = 1;j<k;j++){
      v[k][j]=(v[k-1][j-1]+v[k-1][j]);
    }
  }
}

int main() {
    cin >> m >> a >> b;
    if (m == 0) {
        cout << 0 << endl;
    }
    ll al, bl;
    vector<vector<long long int> > v(b+1,vector<long long int>(b,0));
    comb(v, max);
    al = v[m][a];
    bl = v[m][b];
    ll k = (pow(2, m) - 1 - al - bl);
    ll d = (pow(10, 9) + 7);
    cout << k % d << endl;
}
// uintmax_t combination(unsigned int n, unsigned int r) {
//   if ( r * 2 > n ) r = n - r;
//   uintmax_t dividend = 1;
//   uintmax_t divisor  = 1;
//   for ( unsigned int i = 1; i <= r; ++i ) {
//     dividend *= (n-i+1);
//     divisor  *= i;
//   }
//   return dividend / divisor;
// }


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: cannot resolve overloaded function 'max' based on conversion to type 'll' {aka 'long long int'}
   29 |     comb(v, max);
      |     ~~~~^~~~~~~~
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
       return num; };
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
       return nume; };
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:12: error: incompatible types: unexpected return value
       return num; };
              ^
Main.java:16: error: incompatible types: unexpected return value
       return nume; };
              ^
2 errors
Language: C++

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

int calc(int n){
  if(n==0){
    return 1;
  }else{
    return n*calc(n-1);

int main(){
  int n,a,b;
  cin >> n >> a >> b;
  long ans=0;
  for(int i=0;i<n;i++){
    ans=calc(n);
  }
  ans-=calc(a);
  ans-=calc(b);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int calc(int)':
a.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   10 | int main(){
      |         ^~
a.cc:10:9: note: remove parentheses to default-initialize a variable
   10 | int main(){
      |         ^~
      |         --
a.cc:10:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:10:11: error: a function-definition is not allowed here before '{' token
   10 | int main(){
      |           ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:7:8: note: to match this '{'
    7 |   }else{
      |        ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:16: note: to match this '{'
    4 | int calc(int n){
      |                ^
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
       return num };
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
       return nume };
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:12: error: ';' expected
       return num };
                 ^
Main.java:16: error: ';' expected
       return nume };
                  ^
2 errors
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;typedef vector<ll> vll;
#define fill(a) memset(a, 0, sizeof (a))
#define all(v) (v).begin(),(v).end()
#define sp(k) cout<<setprecision(k)<<fixed;
#define rep(i,a) for(int i=0; i<a;i++)
#define rep1(i,a,b) for(int i=(a);i<=(b);++i)
#define irep(i,b,a) for(int i=(b);i>=(a);--i)
#define minv(v) *min_element(v.begin(),v.end())
#define maxv(v) *max_element(v.begin(),v.end())
#define each(it,s) for(auto it = s.begin(); it != s.end(); ++it)
#define unq(v) sort(all(v)),(v).erase(unique((v).begin(),(v).end()),(v).end())
#define getpos(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define _ios ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ff first
#define ss second
#define pb push_back
#define sz(x) (int)x.size()

const double pi = acos(-1.0);
const int mod = 1000000007; // (int)1e9+7
const int maxn = 2000100;
int nCrModpDP(int n, int r, int p)
{
    int C[r+1];
    memset(C, 0, sizeof(C));

    C[0] = 1;
    for (int i = 1; i <= n; i++)
    {

        for (int j = min(i, r); j > 0; j--)
            C[j] = (C[j] + C[j-1])%p;
    }
    return C[r];
}

int nCrModpLucas(int n, int r, int p)
{
   if (r==0)
      return 1;
   int ni = n%p, ri = r%p;
   return (nCrModpLucas(n/p, r/p, p) * /
           nCrModpDP(ni, ri, p)) % p;
}
int main(){
        _ios;


        ll n,a,b;
        cin>>n>>a>>b;
        ll sum = 0;
        for(int i = 1; i<=n;i++){
            if(i==a or i ==b)continue;
            sum+=nCrModpLucas(n,i,mod);
            sum%=mod;
        }
        cout<<sum<<endl;




return 0;
}






Compiler output:
a.cc: In function 'int nCrModpLucas(int, int, int)':
a.cc:47:40: error: expected primary-expression before '/' token
   47 |    return (nCrModpLucas(n/p, r/p, p) * /
      |                                        ^
Language: C

#include <stdio.h>
/*--- 異なるn個からr個の整数を取り出す組み合わせの数を返す ---*/
int combination(int n, int r)
{
    if (r == 0 || r == n)
        return (1);
    else if (r == 1)
        return (n);
    return (combination(n - 1, r - 1) + combination(n - 1, r));
}
int main(){
	int N, a, b, sum;
	scanf("%d%d%d",&N,&a,&b);
	for (int i = 1;i < a;i++){
		sum += combination(N, i);
		sum %= 1000000007;
	}
	for (int i = a + 1;i < b;i++){
		sum += combination(N, i);
		sum %= 1000000007;
	}
	for (int i = b + 1;i <= N;i++){
		sum += combination(N, i);
		sum %= 1000000007;
	}
	printf("%d",sum % 1000000007)
}
	

Compiler output:
main.c: In function 'main':
main.c:26:38: error: expected ';' before '}' token
   26 |         printf("%d",sum % 1000000007)
      |                                      ^
      |                                      ;
   27 | }
      | ~
Language: C++

#include <stdlib.h>
#include <iostream.h>
std::vector<std::vector<long long>> comb(int n, int r) {
  std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}
int n, a, b;
cin >> n >> a >> b;
cout << fmod(pow(2,n) -1 -comb(n,a) -comb(n,b), 10e9+7)

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

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
  
int main(){

long long int n,a,b,c1=1,c2=1,n1,n2;
  cin>>n>>a>>b;
   long long int t1 = a,t2=b;
  n1=n;
  n2=n;
 int1024_t arr[n+1],sum=0;
  arr[0]=0;
  for(int i=1;i<n+1;i++){
  arr[i] = (2*arr[i-1])+1;
  }
  
  while(t1){
  n1*=t1;
    t1--
  }
  while(t2){
  n2*=t2;
    t2--
  }
  while(a!=1){
  c1*=a;
    a--;
  }
  while(b!=1){
  c2*=b;
    b--;
  }
  
  sum=arr[n]-(n1/c1)-(n2/c2);
  
  
  cout<<(sum%(7+1000000000))<<endl;

}


Compiler output:
a.cc:2:9: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    2 | #include<boost/multiprecision/cpp_int.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
        }
        int f = return;
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
        }
        int g = return;
    int d = c - f - g;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:13: error: illegal start of expression
        int f = return;
                ^
Main.java:18: error: illegal start of expression
        int g = return;
                ^
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
        }
        int f = return;
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
        }
        int g = return;
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:13: error: illegal start of expression
        int f = return;
                ^
Main.java:18: error: illegal start of expression
        int g = return;
                ^
2 errors
Language: C++

#include <vector>
#include <math.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <iomanip>
#include <deque>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i, a, n) for(int i = a; i<n; i++)
#define ALL(a) begin(a), end(a)
#define mii map<int, int>
#define msi map<string, int>
#define vi vector<int>
#define vl vector<ll>
#define MOD 1000000007
#define INF 1e9
#define showVector(v) rep(i,0,v.size()){p(v[i]);p(" ")} pl("")
#define p(s) std::cout << s ;
#define pl(s)  std::cout << s << endl;
 
const ll MAX = 1000000000;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
int main() {
   ll n, a, b;
   cin >> n >> a >> b;
  COMinit();
 
  //cout << COM(n-1+k, k) << endl;
  ll res = 0;
    //ll mi = n/2;
    rep(i, 1, n+1) {
        if (i == a) continue;
        if (i == b) continue;
        res += COM(n, i) % MOD;
        //res += nCrModPFermat(n, i, MOD);

    }
    //res *= 2;
    //res -= nCr(n, a);
    //res -= nCr(n, b);
    //res += 1;
    cout << res % MOD << endl;
}

Compiler output:
/tmp/ccDJprPz.o: in function `COMinit()':
a.cc:(.text+0x20): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x135): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x150): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x168): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
/tmp/ccDJprPz.o: in function `COM(int, int)':
a.cc:(.text+0x22e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccDJprPz.o
a.cc:(.text+0x249): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
  
int main(){

long long int n,a,b,c1=1,c2=1,n1,n2;
  long long int t1 = a,t2=b;
  cin>>n>>a>>b;
  n1=n;
  n2=n;
 int1024_t arr[n+1],sum=0;
  arr[0]=0;
  for(int i=1;i<n+1;i++){
  arr[i] = (2*arr[i-1])+1;
  }
  
  while(t1){
  n1*=t1;
    t1--
  }
  while(t2){
  n2*=t2;
    t2--
  }
  while(a!=1){
  c1*=a
    a--;
  }
  while(b!=1){
  c2*=b
    b--;
  }
  
  sum=arr[n]-(n1/c1)-(n2/c2);
  
  
  cout<<(sum%(7+1000000000))<<endl;

}


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

std::vector<std::vector<long long>> comb(int n, int r) {
  std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0));
  for (int i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (int j = 1; j < v.size(); j++) {
    for (int k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}
int n, a, b;
cin >> n >> a >> b;
cout << fmod(pow(2,n) -1 -comb(n,a) -comb(n,b), 10e9+7)

Compiler output:
a.cc:1:6: error: 'vector' in namespace 'std' does not name a template type
    1 | std::vector<std::vector<long long>> comb(int n, int r) {
      |      ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | std::vector<std::vector<long long>> comb(int n, int r) {
a.cc:15:1: error: 'cin' does not name a type
   15 | cin >> n >> a >> b;
      | ^~~
a.cc:16:1: error: 'cout' does not name a type
   16 | cout << fmod(pow(2,n) -1 -comb(n,a) -comb(n,b), 10e9+7)
      | ^~~~
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 a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
        }
        return num;
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
        }
        return nume;
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:13: error: incompatible types: unexpected return value
        return num;
               ^
Main.java:18: error: incompatible types: unexpected return value
        return nume;
               ^
2 errors
Language: C++

#include<iostream>
#include<string>
using namespace std;

int kaijo(int n, int c)
{
	int bo = 1;
  	int shi = 1;
	for (int j = 0; j < c; j++) {
    	bo *= n - j;
        shi *= j+1;
    }
  	return bo / shi;
}

int main()
{
	int n, a, b;
	cin >> n >> a >> b;
  
  	int ans;
  	for (int i = 0; i < int(n/2); i++) {
    	ans += kaijo(n, i);
    }
          
    ans *= 2;
    ans += 1;
    if n % 2 == 0:
    	ans += kaijo(n, n/2);
    ans -= kaijo(n, a);
    ans -= kaijo(n, b);
          
    cout << ans % (10**9 + 7) << endl;
  
  	return 0;  	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: expected '(' before 'n'
   28 |     if n % 2 == 0:
      |        ^
      |        (
a.cc:33:23: error: invalid type argument of unary '*' (have 'int')
   33 |     cout << ans % (10**9 + 7) << endl;
      |                       ^~
Language: C++

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

#define MOD 1000000007

long long int nmod(long long int n){
    long  long int x=2,m=MOD,z=n;
    x=x % m;
    long long int beki;

    for(beki=1 ; z>0 ; z=z/2){ /* beki に 1 を代入し, z が正である限り, 
                                  for文の終りまでの部分を実行を反復するが, 
                                  各反復の後に必ず, z の 2 による商で z の値を更新する.  */
      if(z % 2 != 0){          /* z を 2 で割った余りが 1 ならば */
	beki=(beki*x) % m;     /* beki と x の積を法 m で割った余りの値で, beki の値を更新する.  */
      }

      x=(x*x) % m;            /* x の自乗を法 m で割った余りの値で,  x の値を更新する.  */
    } /* for 文の終り */

  return beki;      /* beki の値をプリントして改行する.  */

  } /* x == 0 でない場合の処理終り */

long long int combi(long long int n, long long int r) {
    if (r == 0) {
        return 1;
    }
    
    return (n - r + 1)%MOD * combi(n, r - 1)%MOD / modinv(r);

}
// (a/b)%P の場合は，(a%P)*modinv(b)%P とする
long long int modinv(long long int a) {
    long long int b = MOD, u = 1, v = 0;
    while (b) {
        long long int t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= MOD;
    if (u < 0) u += MOD;
    return u;
}

int main(){
    long long int ans,n,a,b;
    cin >> n >> a >> b;
    ans=nmod(n);
    ans=ans-1-combi(n,a)-combi(n,b);
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'long long int combi(long long int, long long int)':
a.cc:30:52: error: 'modinv' was not declared in this scope
   30 |     return (n - r + 1)%MOD * combi(n, r - 1)%MOD / modinv(r);
      |                                                    ^~~~~~
Language: Java

import java.util.*;
public class Main{
  public statiuc void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1;
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
        }
        return num;
    int nume = 1;
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
        }
        return nume;
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:3: error: <identifier> expected
  public statiuc void main(String[] args){
                ^
1 error
Language: C++

#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>

#define _GLIBCXX_DEBUG
#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
using namespace std;
using vi = vector<int64_t>;
using vvi = vector<vi>;

const int MAX = 1000000007;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int64_t n, int64_t k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main(int argc, const char * argv[]) {
    // fasten cin
    cin.tie(0);
    ios::sync_with_stdio(false);
    // implement
    int64_t INF = 1000000007;
    int64_t n,a,b;
    cin >> n >> a >> b;
    // combinationを実装するか。。。
    int64_t res = 1<<n;
    res %= INF;
    res -= 1;
    // aの場合とbの場合を引く
    // 前処理
    COMinit();
    res -= COM(n, a);
    COMinit();
    res -= COM(n, b);
    cout << res << endl;
}


Compiler output:
/tmp/ccB2dUEd.o: in function `COMinit()':
a.cc:(.text+0x20): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x135): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x150): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x168): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
/tmp/ccB2dUEd.o: in function `COM(long, long)':
a.cc:(.text+0x232): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccB2dUEd.o
a.cc:(.text+0x24d): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int Kaizyo (int n){
  if(n==0) {return 1;}
  else {return n * Kaizyo(n-1);}
}

int main(){
  int n, a, b;
  cin >> n >> a >> b;
  int sum = 0;
  
  for (int i = 1; i <= n; i++){
    
    if(n == a || n == b) continue;
    
    sum += (int)Kaizyo(n)/(Kaizyo(n-i)*Kaizyo(i));
  }
  
  cout << sum % ((int)Zyo(10,9) + 7) << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: 'Zyo' was not declared in this scope
   21 |   cout << sum % ((int)Zyo(10,9) + 7) << endl;
      |                       ^~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<math.h>
using namespace std;
long long dp[1e5][1e5];
long long c(long long n, long long r) {
	if (n == r) dp[n][r] = 1;
	if (r == 0)dp[n][r] = 1;
	if (r == 1)dp[n][r] = n;
	if (dp[n][r])return dp[n][r];
	return dp[n][r] = c(n - 1, r) + c(n - 1, r - 1);
}
int main() {
	int n, a, b;
	cin >> n >> a >> b;
	if (n == 2) {
		cout << "0" << endl;
	}
	else {
		cout << (pow(2, n) - n - c(n, a) - c(n, b)) / 1e9 + 7 << endl;
	}
}

Compiler output:
a.cc:7:19: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 | long long dp[1e5][1e5];
      |                   ^~~
a.cc:7:19: error: could not convert '1.0e+5' from 'double' to 'long unsigned int'
    7 | long long dp[1e5][1e5];
      |                   ^~~
      |                   |
      |                   double
a.cc:7:19: error: size of array 'dp' has non-integral type 'double'
a.cc:7:14: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 | long long dp[1e5][1e5];
      |              ^~~
a.cc:7:14: error: could not convert '1.0e+5' from 'double' to 'long unsigned int'
    7 | long long dp[1e5][1e5];
      |              ^~~
      |              |
      |              double
a.cc:7:14: error: size of array 'dp' has non-integral type 'double'
Language: Java

import java.util.*;
public class Main{
  public statiuc void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = 2^n-1;
    int num = 1
    for(int i = 1; i <= a; i++){
            num = num * (n - i + 1) / i;
        }
        return num;
    int nume = 1
    for(int i = 1; i <= b; i++){
            nume = nume * (n - i + 1) / i;
        }
        return nume;
    int d = c - num - nume;
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:3: error: <identifier> expected
  public statiuc void main(String[] args){
                ^
Main.java:9: error: ';' expected
    int num = 1
               ^
Main.java:14: error: ';' expected
    int nume = 1
                ^
3 errors
Language: C++

#include <iostream>
using namespace std;
long long factorial(int x)
{
    if(x == 0 || x == 1)
        return 1;
    else
        return x * factorial(x - 1);
}
int main()
{
  long long n, a, b, i = 1, ans;
  cin >> n >> a >> b;
  while(i <= n){
    if(i != a || i != b)
      ans += factorial(n) / (factorial(i) * factorial(n - i);
      i++;
  }
  cout << ans % (1e9 + 7);
  return 0;
}
      
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:61: error: expected ')' before ';' token
   16 |       ans += factorial(n) / (factorial(i) * factorial(n - i);
      |                             ~                               ^
      |                                                             )
a.cc:19:15: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   19 |   cout << ans % (1e9 + 7);
      |           ~~~ ^ ~~~~~~~~~
      |           |          |
      |           |          double
      |           long long int
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#define maxn 1000000000
using namespace std;
typedef long long ll;
const int mod = 1e9+7;


ll res;
ll a,n,b;
int get5[maxn];//需要多少个数字形成组合
int num[maxn];
int c[maxn];

bool ok(int get[],int k){
  for(int i=0;i<k;i++)
    if(get[i]>=get[k])
     return false;
return true;
}

ll dfs(ll nu){
	ll f = 0;
for(int i=0;i<nu;i++) 
  get5[i]=-1;
  
 int k=0;

for(int i=0;i<nu;i++)
    c[i]=0;

     while(k>=0){
     while(c[k]<n){
     get5[k]=num[c[k]++];
if(ok(get5,k)&&k==nu-1)//得到一个完整组合 
{
f++;
}
else if(ok(get5,k)&&k<nu-1)k++;//得到部分解，继续往下走 
}
get5[k]==-1;
c[k]=0;
k--;
}
 return f;
}


int main(){
	cin>>n>>a>>b;
	
	ll sum  = 0;
	
	if(n == 2){
	 cout<<0<<endl;
	 return 0;	
	} 
	for(int i=0;i<n;i++) num[i] = i+1;
	
	for(int i=1;i<=n;i++){//能选取花的区间 
		if(i == a || i == b){
			continue;
		}
		res = 0;
		ll ans = dfs(i);//需要几朵花 
		
		sum += ans;
		sum %= mod;
	}
	
	sum %= mod;
	cout<<sum<<endl;
	return 0;
}

Compiler output:
/tmp/cc6IvYyA.o: in function `dfs(long long)':
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/cc6IvYyA.o
a.cc:(.text+0xf4): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/cc6IvYyA.o
a.cc:(.text+0x10f): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/cc6IvYyA.o
a.cc:(.text+0x123): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/cc6IvYyA.o
a.cc:(.text+0x1d3): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/cc6IvYyA.o
a.cc:(.text+0x1fd): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/cc6IvYyA.o
/tmp/cc6IvYyA.o: in function `main':
a.cc:(.text+0x2c7): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/cc6IvYyA.o
collect2: error: ld returned 1 exit status
Language: C++


#include <string>
#include <map>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <utility>//pair icin
#include <bits/stdc++.h>

using namespace std;
typedef long long lint;
typedef long double ld;
#define int lint
#define debug(x) cout << "debugger:  " << x << endl;

#define INF int(1e18)
#define mod 1000000007

int fact(int n); 
  
int ncr(int n, int r) 
{ 
    return (fact(n) / (fact(r) * fact(n - r)))%mod; 
} 
  
// Returns factorial of n 
int fact(int n) 
{ 
    int res = 1; 
    for (int i = 2; i <= n; i++) 
        res = res * i; 
    return res%mod; 
} 

int gcd( int a, int b){
    if( b == 0)
        return a;
    return gcd( b, a % b);
}
int lcm(int a, int b) 
{ 
    return (a / gcd(a, b) * b); 
} 
/* Iterative Function to calculate (x^y) in O(log y) */
int power(int x, int y) 
{ 
    int res = 1;     // Initialize result 
   
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x)%mod; 
   
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x)%mod;  // Change x to x^2 
    } 
    return res%mod; 
}
signed main(){
    int n,a,b;
    cin >> n >> a >> b;
  	cout << power(2,n) - ncr(n,q) - ncr(n,b) -1;
    
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:36: error: 'q' was not declared in this scope
   65 |         cout << power(2,n) - ncr(n,q) - ncr(n,b) -1;
      |                                    ^
Language: Java

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
//		String s = sc.next();
//		int n = sc.nextInt();
		int n = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();

		BigInteger ans = 0;

		for(int i=1;i<=n;i++) {
			if(i!=a && i!=b) {

				BigInteger bunsi = new BigInteger("1");
				for(BigInteger j=0;j<i;j++) {

					BigInteger kake = new BigInteger("n-j");
					bunsi = bunsi.multiply(kake);
				}
				BigInteger bunbo = new BigInteger("1");
				for(BigInteger j=0;j<i;j++) {
					BigInteger kake = new BigInteger("j+1");

					bunbo = bunbo.multiply(kake);
				}

//				System.out.println(bunsi + "," + bunbo);
				BigInteger nci =  bunsi.divide(bunbo);
				ans = ans.add(nci);

			}
		}

		BigInteger waru = new BigInteger("1000000007");

		ans = ans.remainder(waru);

		System.out.println(ans);

	}
}


Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to BigInteger
		BigInteger ans = 0;
		                 ^
Main.java:20: error: incompatible types: int cannot be converted to BigInteger
				for(BigInteger j=0;j<i;j++) {
				                 ^
Main.java:20: error: bad operand types for binary operator '<'
				for(BigInteger j=0;j<i;j++) {
				                    ^
  first type:  BigInteger
  second type: int
Main.java:20: error: bad operand type BigInteger for unary operator '++'
				for(BigInteger j=0;j<i;j++) {
				                        ^
Main.java:26: error: incompatible types: int cannot be converted to BigInteger
				for(BigInteger j=0;j<i;j++) {
				                 ^
Main.java:26: error: bad operand types for binary operator '<'
				for(BigInteger j=0;j<i;j++) {
				                    ^
  first type:  BigInteger
  second type: int
Main.java:26: error: bad operand type BigInteger for unary operator '++'
				for(BigInteger j=0;j<i;j++) {
				                        ^
7 errors
Language: C++



#include <string>
#include <map>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <utility>//pair icin
#include <bits/stdc++.h>

using namespace std;
typedef long long lint;
typedef long double ld;
#define int lint
#define debug(x) cout << "debugger:  " << x << endl;

#define INF int(1e18)
#define mod 1000000007

int fact(int n); 
  
int ncr(int n, int r) 
{ 
    return (fact(n) / (fact(r) * fact(n - r)))%mod; 
} 
  
// Returns factorial of n 
int fact(int n) 
{ 
    int res = 1; 
    for (int i = 2; i <= n; i++) 
        res = res * i; 
    return res%mod; 
} 

int gcd( int a, int b){
    if( b == 0)
        return a;
    return gcd( b, a % b);
}
int lcm(int a, int b) 
{ 
    return (a / gcd(a, b) * b); 
} 
/* Iterative Function to calculate (x^y) in O(log y) */
int power(int x, unsigned int y) 
{ 
    int res = 1;     // Initialize result 
   
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x)%mod; 
   
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x)%mod;  // Change x to x^2 
    } 
    return res%mod; 
}
signed main(){
    int n,a,b;
    cin >> n >> a >> b;
  	cout << power(2,n) - ncr(n,q) - ncr(n,b) -1;
    
    
    return 0;
}

Compiler output:
a.cc:47:31: error: expected ',' or '...' before 'y'
   47 | int power(int x, unsigned int y)
      |                               ^
a.cc: In function 'lint power(lint, unsigned int)':
a.cc:49:9: error: expected ';' before 'res'
   49 |     int res = 1;     // Initialize result
      |         ^~~
a.cc:51:12: error: 'y' was not declared in this scope
   51 |     while (y > 0)
      |            ^
a.cc:55:13: error: 'res' was not declared in this scope
   55 |             res = (res*x)%mod;
      |             ^~~
a.cc:61:12: error: 'res' was not declared in this scope
   61 |     return res%mod;
      |            ^~~
a.cc: In function 'int main()':
a.cc:66:36: error: 'q' was not declared in this scope
   66 |         cout << power(2,n) - ncr(n,q) - ncr(n,b) -1;
      |                                    ^