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

#include<iostream>
#include<math.h>
using namespace std;
 
double comb(int a, int b){
  double p;
  for(int i=0; i<b; i++){
    p *= (a-i);
  }
  for(int i=0; i<b; i++){
    p /= (b-i);
  }
  return p;
}
 
int main(void){
  long long n;
  int a,b;
  int kind = 0;
  cin>>n>>a>>b;
  
  for(int i=2; i<=n; i++){
    if(i!=a && i!=b){
      kind+=comb(n,i)
    }
  }
  
  cout<<kind%1000000007<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected ';' before '}' token
   24 |       kind+=comb(n,i)
      |                      ^
      |                      ;
   25 |     }
      |     ~
Language: C++

#include<iostream>
#include<math.h>
using namespace std;

double comb(int a, int b){
  double p;
  for(int i=0; i<b; i++){
    p *= (a-i);
  }
  for(int i=0; i<b; i++){
    p /= (b-i);
  }
  return p;
}

int main(void){
  long long n;
  int a,b;
  int kind = 0;
  cin>>n>>a>>b;
  
  for(int i=2; i<=n; i++){
    if(i!=a && i!=b){
      kind+=comb(n,i)
    }
  }
  
  cout<<kind%1000000007<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected ';' before '}' token
   24 |       kind+=comb(n,i)
      |                      ^
      |                      ;
   25 |     }
      |     ~
Language: C++

n, a, b = map(int, input().split())
MOD = 10**9+7


def modpow(a, n, mod):
    rtn = 1
    while n > 0:
        if n & 1:
            rtn = (rtn * a) % mod
        a = (a*a) % mod
        n >>= 1
    return rtn


def modcmb(n, k, mod):
    rtn = n
    for i in range(1, k):
        rtn = (rtn * (n-i) * modpow(i+1, mod-2, mod)) % mod

    return rtn


ans = modpow(2, n, MOD) - 1 - modcmb(n, a, MOD) - modcmb(n, b, MOD)
print(ans if ans >= 0 else ans + MOD)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n, a, b = map(int, input().split())
      | ^
Language: Java

import java.util.*;

public class D {
    static Scanner sc = new Scanner(System.in);
	static final int MOD = 1000000007;
	static long[] f = null;
	static long[] fInverse = null;

    public static void main(String[] args) {
        int n = Integer.parseInt(sc.next());
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        f = new long[b + 1];
        fInverse = new long[b + 1];
        for(int i = 1; i <= b; ++i) {
            f[i] = (i == 1) ? 1 : f[i - 1] * i % MOD;
            fInverse[i] = calcModInv(f[i]);
        }

        long ans = pow(2, n) - 1L - comb(n, a) - comb(n, b);
        while(ans < 0L) {
            ans += MOD;
        }
        System.out.println(ans);
    }

    static long comb(int n, int r) {
        long perm = 1L;
        for(int i = n; i > n - r; --i) {
            perm = perm * i % MOD;
        }
        return perm * fInverse[r] % MOD;
    }
	
	static long calcModInv(long n) {
		long[] s = new long[2];
		solveEquation(n, MOD, s);
		return (s[0] >= 0) ? s[0] : s[0] + MOD;
	}
	
	static void solveEquation(long a, long b, long[] res) {
		if(a < b) solveEquation(b, a, res);		
		if(b == 0) {
			res[0] = 1;
			res[1] = 0;
			return;
		}		
		solveEquation(b, a % b, res);
		long tmp = res[0] % MOD;
		res[0] = res[1] % MOD;
		res[1] = tmp - a / b % MOD * res[1] % MOD;
    }
    
    static long pow(long a, long x) {
        if(x == 0L) {
            return 1L;
        }

        long t = pow(a, x / 2L);
        if(x % 2L == 0) {
            return t * t % MOD;
        } else {
            return t * t % MOD * a % MOD;
        }
    }

    static boolean isPrime(long n) {
        for(long t = 2L; t * t <= n; t += (t == 2L) ? 1L : 2L) {
            if(n % t == 0L) {
                return false;
            }
        }
        return true;
    }
}

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

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

int main(){
	long long int n,a,k;
	cin >> n >> a >>k;
	long long int counta =1;
	long long int beki =1;
	for(long long int i=0;i<n;i++){
		beki=beki*2;
		if(beki>1000000007){
			beki=beki%1000000007;
		}
	}
	for(long long int i=n;i>n-a;n--){
		counta = counta*i;
	}
	for(long long int i=1;i<a+1;n++){
		counta = counta/i;
	}
	long long int countk =1;
	for(long long int i=n;i>n-a;n--){
		countk = countk*i;
	}
	for(long long int i=1;i<a+1;n++){
		countk = countk/i;
	}
	cout << beki-1-count-countk << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:23: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator-'
   28 |         cout << beki-1-count-countk << endl;
      |                 ~~~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
ll rs(ll n,ll p,ll m)
{
  if(p==0) return 1;
    if(p%2==0){
        ll temp = rs(n, p/2, m);
        return temp*temp % m;
    }
    return n * rs(n, p-1, m);
}
 
int main()
{
  int n,a,b;
  cin >> n >> a >> b;
  ll mod = 1000000007
  ll ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: expected ',' or ';' before 'll'
   19 |   ll ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
      |   ^~
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
using namespace std
using ll = long long int;
ll rs(ll n,ll p,ll m)
{
  if(p==0) return 1;
    if(p%2==0){
        ll temp = rs(n, p/2, m);
        return temp*temp % m;
    }
    return n * rs(n, p-1, m);
}
 
int main()
{
  int n,a,b;
  cin >> n >> a >> b;
  ll mod = 1000000007
  ll ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'using'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | using ll = long long int;
      | ~~~~~               
a.cc: In function 'int main()':
a.cc:19:3: error: expected ',' or ';' before 'll'
   19 |   ll ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
      |   ^~
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++.h>
using namespace std
using ll = long long int
ll rs(ll n,ll p,ll m)
{
  if(p==0) return 1;
    if(p%2==0){
        ll temp = rs(n, p/2, m);
        return temp*temp % m;
    }
    return n * rs(n, p-1, m);
}
 
int main()
{
  int n,a,b;
  cin >> n >> a >> b;
  mod = 1000000007
  ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'using'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | using ll = long long int
      | ~~~~~               
a.cc:3:25: error: expected ';' before 'll'
    3 | using ll = long long int
      |                         ^
      |                         ;
    4 | ll rs(ll n,ll p,ll m)
      | ~~                       
a.cc: In function 'int main()':
a.cc:18:3: error: 'mod' was not declared in this scope; did you mean 'modf'?
   18 |   mod = 1000000007
      |   ^~~
      |   modf
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<bits/stdc++>
using namespace std
using ll = long long int
ll rs(ll n,ll p,ll m)
{
  if(p==0) return 1;
    if(p%2==0){
        ll temp = rs(n, p/2, m);
        return temp*temp % m;
    }
    return n * rs(n, p-1, m);
}

int main()
{
  int n,a,b;
  cin >> n >> a >> b;
  mod = 1000000007
  ans = rs(2,n,mod) - 1 - rs(n,a,mod) - rs(n,b,mod);
  cout << ans << endl;
  return 0;
}
  

Compiler output:
a.cc:1:9: fatal error: bits/stdc++: No such file or directory
    1 | #include<bits/stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main(){
  long long n,A=1,B=1,ans=0;
  int a,b;
  cin>>n>>a>>b;
  
  for(int i=n;i>n-a;i--){A=A*i;}
  for(int i=1;i<a+1;i++){A=A/i;}
  for(int i=n;i>n-b;i--){B=B*i;}
  for(int i=1;i<b+1;i++){B=B/i;}
  
  ans=(pow(2,n)-A-B)%(pow(10,9)+7);
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   15 |   ans=(pow(2,n)-A-B)%(pow(10,9)+7);
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
      |                  |             |
      |                  |             __gnu_cxx::__promote<double>::__type {aka double}
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
using namespace std;

int main(){
  long long n,A=1,B=1,ans=0;
  int a,b;
  cin>>n>>a>>b;
  
  for(int i=n;i>n-a;i--){A=A*i;}
  for(int i=1;i<a+1;i++){A=A/i;}
  for(int i=n;i>n-b;i--){B=B*i;}
  for(int i=1;i<b+1;i++){B=B/i;}
  
  ans=(pow(2,n)-A-B)%(pow(10,9)+7);
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'pow' was not declared in this scope
   14 |   ans=(pow(2,n)-A-B)%(pow(10,9)+7);
      |        ^~~
Language: C++

def cmb(n, r):
    if n - r < r:
      r = n - r
    if r == 0: 
      return 1
    if r == 1: 
      return n
    numerator = [] 
    mod = 10**9+7
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
            result %= mod

    return result
def power_func(a,n,p):
  bi=str(format(n,"b"))
  res=1
  for i in range(len(bi)):
    res=(res*res) %p
    if bi[i]=="1":
      res=(res*a) %p
  return res
n, a, b = map(int, input().split())
mod = 10**9+7
ALL = power_func(2,n,mod)-1
A = cmb(n,a)
B = cmb(n, b)
ans = ALL-A-B
while ans < 0:
  ans = mod + ans
print(ans)


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def cmb(n, r):
      | ^~~
Language: C++

#include "bits/stdc++.h"
#define rep(i,b) for(ll i=0;i<b;i++)
#define ll long long
using namespace std;
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vvvl vector<vector<vector<ll>>>
#define debug(x) cerr<<#x<<" "<<x<<'\n';
bool cmp(pair<ll,ll> a, pair<ll,ll> b) { return a.second < b.second; }
 
const int MOD = 1000000007;
#define int long long
//繰り返し二乗
ll RepeatSquaring(ll N, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = RepeatSquaring(N, P/2, M);
        return t*t % M;
    }
    return N * RepeatSquaring(N, P-1, M);
}


const int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void init() {
    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;
}
}

int main() {
    ll n,a,b; cin>>n>>a>>b;
    init();
    ll ans=RepeatSquaring(2,n,MOD)-1;
    ll B=1;
    if(b>n/2)b=n-b;
    if(a>n/2)a=n-a;
    rep(i,b){
        B*=(n-i)*inv[i+1]%MOD;
        B=(B+MOD)%MOD;
    }
    ll A=1;
    rep(i,a){
        A*=(n-i)*inv[i+1]%MOD;
        A=(A+MOD)%MOD;
    }
    debug(A);
 
 
    debug(B)
    cout<<(ans-A-B+MOD)%MOD<<endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
//ll ar[500009],br[500009];

ll modPow(ll a, ll x, ll p)
{
    //calculates a^x mod p in logarithmic time.
    ll res = 1;
    while(x > 0)
    {
        if( x % 2 != 0)
        {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}

ll modInverse(ll a, ll p)
{
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}
ll modBinomial(ll n, ll k, ll p)
{
// calculates C(n,k) mod p (assuming p is prime).

    ll numerator = 1; // n * (n-1) * ... * (n-k+1)
    for (ll i=0; i<k; i++)
    {
        numerator = (numerator * (n-i) ) % p;
    }

    ll denominator = 1; // k!
    for (ll i=1; i<=k; i++)
    {
        denominator = (denominator * i) % p;
    }

    // numerator / denominator mod p.
    return ( numerator* modInverse(denominator,p) ) % p;
}
ll Bigmod(ll base,ll pow,ll mod)
{
    ll res=1;
    while(pow!=0)
    {
        if(pow%2==1)
        {
            res=((res%mod)*(base%mod))%mod;
        }
        base=((base%mod)*(base%mod))%mod;
        pow=pow/2;
    }
    return res;
}
int main()
{
    ll g,f,h,q,b,c,j;

    cin>>q>>b>>c;

    g=((Bigmod(2,q,1000000007)));
    h=modBinomial(q,b,1000000007);
    f=modBinomial(q,c,1000000007);

    j=(g-h-f-1)%1000000007;
    j=(j+1000000007)%1000000007
    cout<<j;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:32: error: expected ';' before 'cout'
   72 |     j=(j+1000000007)%1000000007
      |                                ^
      |                                ;
   73 |     cout<<j;
      |     ~~~~
Language: C++

#include<bits/stdc++.h>
#define int unsigned long
using namespace std;
 
int fac(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
 
int main(){
  int n, a, b;
  cin >> n >> a >> b;
  int sum = 0;
  
  for (int i = 1; i <= n; i++){
    
    if(i == a || i == b) {continue;}
    else{
    sum += (int)fac(n)/(fac(n-i)*fac(i));}
  }
  
  cout << sum % ((int)pow(10,9) + 7) << endl;
  
  return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>
#define int _int64
using namespace std;
 
int fac(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
 
int main(){
  int n, a, b;
  cin >> n >> a >> b;
  int sum = 0;
  
  for (int i = 1; i <= n; i++){
    
    if(i == a || i == b) {continue;}
    else{
    sum += (int)fac(n)/(fac(n-i)*fac(i));}
  }
  
  cout << sum % ((int)pow(10,9) + 7) << endl;
  
  return 0;
}

Compiler output:
a.cc:2:13: error: '_int64' does not name a type
    2 | #define int _int64
      |             ^~~~~~
a.cc:5:1: note: in expansion of macro 'int'
    5 | int fac(int k){
      | ^~~
a.cc:2:13: error: '_int64' does not name a type
    2 | #define int _int64
      |             ^~~~~~
a.cc:14:1: note: in expansion of macro 'int'
   14 | int main(){
      | ^~~
Language: C++

#include<bits/stdc++.h>
#define int int64
using namespace std;
 
int fac(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
 
int main(){
  int n, a, b;
  cin >> n >> a >> b;
  int sum = 0;
  
  for (int i = 1; i <= n; i++){
    
    if(i == a || i == b) {continue;}
    else{
    sum += (int)fac(n)/(fac(n-i)*fac(i));}
  }
  
  cout << sum % ((int)pow(10,9) + 7) << endl;
  
  return 0;
}

Compiler output:
a.cc:2:13: error: 'int64' does not name a type; did you mean 'int64_t'?
    2 | #define int int64
      |             ^~~~~
a.cc:5:1: note: in expansion of macro 'int'
    5 | int fac(int k){
      | ^~~
a.cc:2:13: error: 'int64' does not name a type; did you mean 'int64_t'?
    2 | #define int int64
      |             ^~~~~
a.cc:14:1: note: in expansion of macro 'int'
   14 | int main(){
      | ^~~
Language: C++

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

ll facctorialMethod(ll k);
ll facctorialMethod2(ll k, ll n);
int main() {
    ll n,a,b;
    cin>>n>>a>>b;
    ll sum = pow(2,n)-1;
    sum=sum*2;
    if(n%2==0){
        sum+=nkai
                  /(facctorialMethod2(n/2,n)%1000000007);
    }
    sum-=nkai / (facctorialMethod(a)*facctorialMethod(n-a)%1000000007);
    sum-=nkai / (facctorialMethod(b)*facctorialMethod(n-b)%1000000007);
    cout<<sum-1<<endl;
}
ll facctorialMethod(ll k){
    ll sum = 1;
    for (ll i = 1; i <= k; ++i)
    {
        sum *= i;
        sum %= 1000000007;
    }
    return sum;
}
ll facctorialMethod2(ll k, ll n){
    ll sum = 1;
    ll tmp = 1;
    for (ll i = 1; i <= n-k; ++i)
    {
        sum *= i;
        sum %= 1000000007;
        if(i==k){
            tmp=sum;
        }
    }
    sum=sum*tmp%1000000007;
    return sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'nkai' was not declared in this scope
   14 |         sum+=nkai
      |              ^~~~
a.cc:17:10: error: 'nkai' was not declared in this scope
   17 |     sum-=nkai / (facctorialMethod(a)*facctorialMethod(n-a)%1000000007);
      |          ^~~~
Language: Java


public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int kindsOfFlowers = scanner.nextInt();
        int a = scanner.nextInt();
        int b = scanner.nextInt();

        int answer = 0;
        for (int i = 1; i <= kindsOfFlowers; i++) {
            if (i != a && i != b) {
                double last = kindsOfFlowers - i + 1;
                answer += (last / 2 * (1 + last));

            }
        }

        System.out.println(answer);

    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
}

Compiler output:
a.cc: In function 'long long int modinv(long long int, long long int)':
a.cc:5:21: error: 'swap' was not declared in this scope
    5 |         a -= t * b; swap(a, b);
      |                     ^~~~
Language: C

#include<stdio.h>
int main(void){
  int N,a,b;
  scanf("%d %d %d",&N, %a, %b);
  int LIM=1000000007;
  int hana=0;
  int C=1;
  for( int i=1; i<N+1; i++){
    C=C*(N-i+1)/i;
    if(i==a || i==b){
      continue;
  	}else{
      hana +=C;
    }
    if(hana > LIM){
      hana=hana%LIM
    }
  }
  printf("%d",hana);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:24: error: expected expression before '%' token
    4 |   scanf("%d %d %d",&N, %a, %b);
      |                        ^
main.c:16:20: error: expected ';' before '}' token
   16 |       hana=hana%LIM
      |                    ^
      |                    ;
   17 |     }
      |     ~
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++){
      int num;
            num = num * (n - i + 1) / i;
       return num};
    for(int i = 1; i <= b; i++){
      int nume ;
            nume = nume * (n - i + 1) / i;
       return nume; };
    int d = c - num*(2^a) - nume*(2^b);
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:12: error: ';' expected
       return num};
                 ^
1 error
Language: C++

#include<iostream>
#include<queue>
#include<stack>
#include<string>
#include<cstring>
#include<cmath>
#include<algorithm>

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

#include <bits/stdc++.h>
 #include <math.h>
#include <iostream>
using namespace std;
#define ll long long
#define pi 3.14159265359


const ll MAX = 510000;
const ll MOD = 1000000007;


ll factorial(ll n)
{
    ll x = 1; // 0! = 1

    for (ll i = 1; i <= n; ++i){
        x *= i;
        x%=MOD;
    }

    return x;
}


ll modpow(ll a, ll n, ll mod) {
    ll res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

ll COM(ll x,ll y){
  
  if(x-y>MOD/2){
    ll a1=factorial(MOD-(x-y));
  }
  else ll a1=factorial(x-y);
  
  ll a2=factorial(y);
  if(x>MOD/2){
  return　factorial(x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
  }
  else{
    return　factorial(MOD-x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
  }
    
}

int main() {
    
    ll n,a,b;
    cin>>n>>a>>b;

    // 計算例
    cout<<((modpow(2,n,MOD)-1-COM(n,a))%MOD-COM(n,b))%MOD<<endl;
    
}

Compiler output:
a.cc:45:3: error: extended character 　 is not valid in an identifier
   45 |   return　factorial(x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |   ^
a.cc:48:5: error: extended character 　 is not valid in an identifier
   48 |     return　factorial(MOD-x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |     ^
a.cc: In function 'long long int COM(long long int, long long int)':
a.cc:45:3: error: 'return\U00003000factorial' was not declared in this scope
   45 |   return　factorial(x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |   ^~~~~~~~~~~~~~~~~
a.cc:45:31: error: 'a1' was not declared in this scope; did you mean 'a2'?
   45 |   return　factorial(x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |                               ^~
      |                               a2
a.cc:48:5: error: 'return\U00003000factorial' was not declared in this scope
   48 |     return　factorial(MOD-x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |     ^~~~~~~~~~~~~~~~~
a.cc:48:37: error: 'a1' was not declared in this scope; did you mean 'a2'?
   48 |     return　factorial(MOD-x)*modpow(a1,MOD-2,MOD)%MOD*modpow(a2,MOD-2,MOD)%MOD;
      |                                     ^~
      |                                     a2
a.cc:51:1: warning: no return statement in function returning non-void [-Wreturn-type]
   51 | }
      | ^
Language: C++

#include "pch.h"
#include<iostream>
#include<algorithm>
#define MOD 1000000007
using namespace std;

unsigned long combi(unsigned long n, unsigned long r) {
	long ue, sita;
	ue = n;
	sita = 1;
	long ans = 0;
	long nn = n;
	if (r > n / 2) {
		r = n - r;
	}
	while (sita<r) {
		nn--;
		sita++;
		ue = ue * nn / sita;
		ue = ue%MOD;
	}
	ans = ue;
	//cout << n << "," << r << " = "<<ans << endl;
	return ans;
}

int main()
{
	long n, a, b;

	cin >> n >> a >> b;
	long i, j, k;

	unsigned long ans = 1;
	unsigned long na = combi(n, a);
	unsigned long nb = combi(n, b);
	//cout << na << " " << nb << endl;
	for (i = 0; i < n; i++) {
		ans *= 2;
		ans %= MOD;
	}

	ans = ans - na - nb - 1;
	ans %= MOD;
	if (ans < 0) {
		ans += MOD;
	}
	cout << ans << endl;
	return 0;
}


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

#include <bits/stdc++.h>
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (b)-1; i >= (a); --i)
using namespace std;
using P = pair<int, int>;

const ll MOD = ll(1e9) + 7;

// int num_of_combination(int n, int r) {
//   int num = 1;
//   for (int i = 1; i <= r; i++) {
//     num = num * (n - i + 1) / i;
//   }
//   return num;
// }

const ll MAX = ll(1e9);

ll fact[MAX], fact_inv[MAX];

// 繰り返し二乗法
ll power(ll a, ll b)
{
  ll res = 1;
  while (b > 0)
  {
    if (b & 1)
      res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}

ll comb(ll n, ll r) {
  return (fact[n] * fact_inv[r]) % MOD * fact_inv[n - r] % MOD;
}

int main()
{
  ll n, a, b;
  cin >> n >> a >> b;

  int ans = 0;

  fact[0] = 1;
  rep(i, n) fact[i + 1] = fact[i] * (i + 1) % MOD;
  fact_inv[n] = power(fact[n], MOD - 2);
  // 逆元の計算
  FORR(i, 0, n) fact_inv[i] = fact_inv[i + 1] * (i + 1) % MOD;

  for (ll i = 1; i <= n; i++) {
    if (i == a) {
      continue;
    }
    if (i == b) {
      continue;
    }
    // cout << comb(n, i) << endl;
    ans += comb(n, i) % MOD;
  }
  cout << ans << endl;
  // cout << ans % MOD << endl;
}

Compiler output:
/tmp/cceJ2Kq2.o: in function `comb(long long, long long)':
a.cc:(.text+0xf9): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/cceJ2Kq2.o
a.cc:(.text+0x14a): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/cceJ2Kq2.o
/tmp/cceJ2Kq2.o: in function `main':
a.cc:(.text+0x2a4): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/cceJ2Kq2.o
a.cc:(.text+0x2cb): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/cceJ2Kq2.o
a.cc:(.text+0x322): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/cceJ2Kq2.o
collect2: error: ld returned 1 exit status
Language: C++

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

unsigned combination( unsigned n, unsigned k )
{
    if (k > n) return 0;
    if (k * 2 > n) k = n-k;
    if (k == 0) return 1;

    int result = n;
    for( int i = 2; i <= k; ++i ) {
        result *= (n-i+1);
        result /= i;
    }
    return result;
}

int main() {
    int a,b,c;
    cin >> a >> b >> c;

    int d = pow(10,9) + 7;
    int e = 0;
    int f = pow(2,a) -1 ;

    int g = f - combination(a,b) - combination(a,c); 

  	if (g <= 0){
      cout << 0 << endl;
    else
    	cout << g % d << endl;
 
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: expected '}' before 'else'
   30 |     else
      |     ^~~~
a.cc:28:20: note: to match this '{'
   28 |         if (g <= 0){
      |                    ^
Language: C++

/*
本宝的程序外人别想看！！

name: [夏宝宝]
run time：[] ms
compilation time: [] ms
output memory: [] MiB
where: []
state: []
*/
#include<bits/stdc++.h>
using namespace std;

#define mod 10000000007

long long Pow(long long a,long long b)
{
    long long res=1ll;
    a%=mod;
    while (b)
    {
        if (b & 1)
            res = (1ll*res * a) % (1ll*mod);
        a = (1ll*a * a) % (1ll*mod);
        b >>= 1ll;
    }
    return 1ll*res%mod;
}

long long c(long long n,long long m)
{
	if (m*2>n)  m=n-m;
	
	if(m==0) return 1;	
	if(m>n-m) m=n-m;
	long long up=1,down=1;	
	for(long long i=1;i<=m;i++)
	{		
		up=(up*(n-i+1))%mod;		
		down=(down*i)%mod;	
	}	
	return up*Pow(down,mod-2)%mod;
}


int main()
{
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	
	cout.sync_with_stdio(false);
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	
	cin>>n;
	
	for(int i=1; i<=n; i++)
	{
		sum=sum*n%(10^9+7);
	}
	
	sum-=c(a, n)+c(b, n)l;
	
	cout<<sum<<endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:17: error: 'sum' was not declared in this scope
   61 |                 sum=sum*n%(10^9+7);
      |                 ^~~
a.cc:64:9: error: 'sum' was not declared in this scope
   64 |         sum-=c(a, n)+c(b, n)l;
      |         ^~~
a.cc:64:16: error: 'a' was not declared in this scope
   64 |         sum-=c(a, n)+c(b, n)l;
      |                ^
a.cc:64:24: error: 'b' was not declared in this scope
   64 |         sum-=c(a, n)+c(b, n)l;
      |                        ^
Language: C++

#include <iostream>
using namespace std;

int modpow(int a, int n, int mod){
  int res = 1;
  while(n>0){
    if(n&1){
      res = res * a % mod;
    }
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}

int ncr(int n, int r, int mod){
  r = min(r, n-r);
  if(r == 0){
  	return 1;
  }
  if(r == 1){
    return n;
  }
  int numerator[r];
  for(int i=0; i<r; i++){
    numerator[i] = n-r+i+1;
  }
  int denominator[r];
  for(int i=0; i<r; i++){
    denominator[i] = i+1;
  }
  int pivot;
  int offset;
  for(int p=2; p<r+1; p++){
    pivot = denominator[p-1];
    if(pivot > 1){
      offset = (n-r)%p;
      for(int k=p-1; k<r; k=k+p){
        numerator[k-offset] *= modpow(pivot, mod-2, mod);
        denominator[k] *= modpow(pivot, mod-2, mod);
        denominator[k] = denominator[k]%mod;
      }
  int result = 1;
  for(int k=0; k<r; k++){
    if(numerator[k]>1){
      result *= numerator[k]%mod;
      result = result%mod;
    }
  }
  return result;
}
      
int main(){
  int n, a, b;
  cin >> n, a, b;
  int mod = 10**9+7;
  cout << (modpow(2, n, mod)-ncr(n, a, mod)-ncr(n, b, mod)-1)%mod << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int ncr(int, int, int)':
a.cc:53:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   53 | int main(){
      |         ^~
a.cc:53:9: note: remove parentheses to default-initialize a variable
   53 | int main(){
      |         ^~
      |         --
a.cc:53:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:53:11: error: a function-definition is not allowed here before '{' token
   53 | int main(){
      |           ^
a.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
a.cc:34:27: note: to match this '{'
   34 |   for(int p=2; p<r+1; p++){
      |                           ^
a.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
a.cc:16:31: note: to match this '{'
   16 | int ncr(int n, int r, int mod){
      |                               ^
a.cc:59:2: warning: control reaches end of non-void function [-Wreturn-type]
   59 | }
      |  ^
Language: C++

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

const int MOD = 1000000007;

long pattern(int N, int k) {
  M = N % MOD;
  if ( k * 2 > N ) k = N - k;
  long num = 1;
  for(int i=1; i<=k; i++){
    num = num * (N - i + 1) / i;
  }
  return num;
}

int main() {
  int N, a, b;
  cin >> N >> a >> b;

  long num = 0;
  for (int i=1; i<=N; i++) {
    if (i == a || i == b) continue;
    num += pattern(N, i);
  }
  
  if (num != 0) {    
    cout << num % MOD << endl;
  } else {
    cout << 0 << endl;
  }
  
}

Compiler output:
a.cc: In function 'long int pattern(int, int)':
a.cc:7:3: error: 'M' was not declared in this scope
    7 |   M = N % MOD;
      |   ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
const int m = 1e9+7;
int main()
{
    ll n,a,b;
    ll t = 1;
    ll ans = 0;
    cin>>n>>a>>b;
    for(int i = 0;i<=n/2){
        if(i == 0) {
        ans++;
        continue;
}
        if((i==a||i==b||i+a==n||i+b==n) && a+b==n){
            continue;
        }
        else if( i==a || i==b) ans+=t*(n-i+1)%m/i%m;
    }
    
cout<<ans<<endl;


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected ';' before ')' token
   12 |     for(int i = 0;i<=n/2){
      |                         ^
      |                         ;
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<math.h>
using namespace std;
int cnt;
int combination(int n, int m) {
	/*
	N<1 or M<0 N<M
	エラー処理がいる
	*/
	//呼び出しのカウント
	cnt++;
	//Overflow対策
	/* nCm=nCn-mは同値の為計算量を減らす */
	if (m > n - m)
		m = n - m;
	if (m == 0 || n == m)
		return 1;
	return combination(n - 1, m) + combination(n - 1, m - 1);
}
int main() {
	long long n, a, b;
	cin >> n >> a >> b;
	if (n == 2) {
		cout << "0" << endl;
	}
	else {
		cout << pow(2,n)-n-combination(n,a)-combination(n.b) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:67: error: request for member 'b' in 'n', which is of non-class type 'long long int'
   30 |                 cout << pow(2,n)-n-combination(n,a)-combination(n.b) << endl;
      |                                                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;

int MAX = 51000;

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;
}

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();
  int n, a, b;
  cin >> n >> a >> b;
  if (a > n / 2) {
    a = n - a;
  }
  if (b > n / 2) {
    b = n - b;
  }
  ll ans = modpow(2, n, MOD) - 1;
  ll a1 = COM(n, a);
  ll b1 = COM(n, b);
  ans = (ans - (a1 + b1) % MOD) % MOD;
  cout << ans << endl;
}

Compiler output:
a.cc:8:15: error: size of array 'fac' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |               ^~~
a.cc:8:26: error: size of array 'finv' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |                          ^~~
a.cc:8:36: error: size of array 'inv' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |                                    ^~~
Language: C++

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

int main() {
  int n, a, b; cin >> n >> a >> b;
  ll sum = 0;
  ll numer = 1; 
  for (int i=1; i<n+1; ++i) numer *= i;
  int ans = 0;
  int dec_tmp = numer / n;
  int inc_tmp = 1;
  
  if (n%2 == 0) int key = n/2-1;
  else key = n/2;
  
  for (int i=1; i<key+1; i++) {
    sum += numer / (dec_tmp * inc_tmp);
    dec_tmp /= n-1;
    inc_tmp *= i+1;
  }
  if (n%2 == 0) {
    sum *= 2;
    sum++;
  } else sum *= 2;
  
  //cout << numer << " " << denom << endl;
  //sum = numer / denom;
  ans = sum % 1000000007;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'key' was not declared in this scope; did you mean 'key_t'?
   17 |   else key = n/2;
      |        ^~~
      |        key_t
a.cc:19:19: error: 'key' was not declared in this scope; did you mean 'key_t'?
   19 |   for (int i=1; i<key+1; i++) {
      |                   ^~~
      |                   key_t
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++){
      int num;
            num = num * (n - i + 1) / i;
       return num };
    for(int i = 1; i <= b; i++){
      int nume ;
            nume = nume * (n - i + 1) / i;
       return nume; };
    int d = c - num*(2^a) - nume*(2^b);
    int e = d/(10^9+7);
    System.out.println( e );
  }
}
    

Compiler output:
Main.java:12: error: ';' expected
       return num };
                 ^
1 error
Language: C++

#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;
//typedef unsigned long long i64;
typedef unsigned long long u64;
typedef boost::multiprecision::int128_t i128;
typedef boost::multiprecision::uint256_t i64;

typedef char str255[256];

#define BIG_PRIME 1000000007
#define remainder(x) ((x) % BIG_PRIME)

i64 n, a, b;

i64 *fact, *factInv;

i64 powi64(i64 a, i64 b){
	i64 ans = 1;
	while(b > 0){
		if(b & 1) ans = ans * a % BIG_PRIME;
		a = a * a % BIG_PRIME;
		b >>= 1;
	}
	return ans;
}

i64 combi(i64 n, i64 r){
	return (fact[n] * factInv[r]) % BIG_PRIME * factInv[n-r] % BIG_PRIME;
}

void Solve()
{
  i64 ans = 0;
  for (int i = 1; i <= n; ++i){
    if ((i == a) || (i == b))
      continue;
    ans += combi(n, i);
    ans %= BIG_PRIME;
  }
  cout << ans << endl;
}

void Init()
{
  cin >> n >> a >> b;
  fact = new i64[n + 5];
  factInv = new i64[n + 5];

  fact[0] = 1;
  for (int i = 0; i < n; ++i){
    fact[i + 1] = fact[i] * (i + 1) % BIG_PRIME;
  }
  factInv[n] = powi64(fact[n], BIG_PRIME - 2);
  for (int i = n - 1; i >= 0; --i){
    factInv[i] = factInv[i + 1] * (i + 1) % BIG_PRIME;
  }

}

void Clean()
{
  delete[] fact;
  delete[] factInv;
}

int main(){ Init(); Solve(); Clean(); return 0; }


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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define DE 1000000007
#define MOD 1000000007
#define MAX 1000000000


int conb(int n,int i){
  if(i>n-i) i=n-i;
  if(i==0 || i==n) return 1;
  if(i==1) return n;
  return (conb(n-1,i-1) + conb(n-1,i))%MOD;
}

long long int 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;
}

  

long int ruijo2(int n){
  if(n==0) return 1;
  if(n==1) return 2;
  if(n%2==0){
    long int tmp=ruijo2(n/2);
    tmp*=tmp;
    return tmp%DE;}
  else{
    long int tmp=2*ruijo2(n-1)%DE;
    return tmp;}
}

int main(){
  int n,a,b;
  scanf("%d%d%d",&n,&a,&b);

  long int ans=ruijo2(n)-1;
  COMinit();
  printf("ok\n");
  ans-=COM(n,a);
  if(ans<0) ans+=DE;
  ans-=COM(n,b);
  if(ans<0) ans+=DE;

  printf("%ld\n",ans);

  return 0;
}


Compiler output:
/tmp/ccA2dCI5.o: in function `COMinit':
main.c:(.text+0xb7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0xc2): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0xd0): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x16b): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x1cc): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x1e7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x1ff): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x24e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
/tmp/ccA2dCI5.o: in function `COM':
main.c:(.text+0x2c5): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccA2dCI5.o
main.c:(.text+0x2e0): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;

int MAX = 510000;

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;
}

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();
  int n, a, b;
  cin >> n >> a >> b;
  if (a > n / 2) {
    a = n - a;
  }
  if (b > n / 2) {
    b = n - b;
  }
  ll ans = modpow(2, n, MOD) - 1;
  ll a1 = COM(n, a);
  ll b1 = COM(n, b);
  ans = (ans - (a1 + b1) % MOD) % MOD;
  cout << ans << endl;
}

Compiler output:
a.cc:8:15: error: size of array 'fac' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |               ^~~
a.cc:8:26: error: size of array 'finv' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |                          ^~~
a.cc:8:36: error: size of array 'inv' is not an integral constant-expression
    8 | long long fac[MAX], finv[MAX], inv[MAX];
      |                                    ^~~
Language: C++

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

long long Pow(long long a,long long b)
{
    long long res=1ll;
    a%=mod;
    while (b)
    {
        if (b & 1)
            res = (1ll*res * a) % (1ll*mod);
        a = (1ll*a * a) % (1ll*mod);
        b >>= 1ll;
    }
    return 1ll*res%mod;
}

long long C(long long n,long long m)
{
	if (m*2>n)  m=n-m;
	
	if(m==0) return 1;	
	if(m>n-m) m=n-m;
	long long up=1,down=1;	
	for(long long i=1;i<=m;i++)
	{		
		up=(up*(n-i+1))%mod;		
		down=(down*i)%mod;	
	}	
	return up*Pow(down,mod-2)%mod;
}

Compiler output:
a.cc: In function 'long long int Pow(long long int, long long int)':
a.cc:7:8: error: 'mod' was not declared in this scope; did you mean 'modf'?
    7 |     a%=mod;
      |        ^~~
      |        modf
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:27:33: error: 'mod' was not declared in this scope; did you mean 'modf'?
   27 |                 up=(up*(n-i+1))%mod;
      |                                 ^~~
      |                                 modf
a.cc:30:28: error: 'mod' was not declared in this scope; did you mean 'modf'?
   30 |         return up*Pow(down,mod-2)%mod;
      |                            ^~~
      |                            modf
Language: C++

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

const int MAX = 1000000000;
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(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 () {
  COMinit();
  int n, a, b;
  cin >> n >> a >> b;
  long long ans = 0;
  long long div = 1000000007;
  long long tmp = 1;
  for (int i = 1; i <= n; ++i) {
    // tmp = tmp * (n + 1 - i);
    // tmp = tmp / i);
    tmp = COM(n, i);
    if (i == a || i == b) {
      continue;
    }
    ans += tmp;
  }
  // ans %= 1000000007;
  printf("%lld\n", ans);
  return 0;
}

Compiler output:
/tmp/cc1MZVAi.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/cc1MZVAi.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x135): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x150): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x168): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc1MZVAi.o
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc1MZVAi.o
/tmp/cc1MZVAi.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/cc1MZVAi.o
a.cc:(.text+0x249): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

vector<vector<long long>> comb(int n, int r) {
	vector<vector<long long>> v(n + 1, 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 main() {
	int n, a, b;
	long long int ans = 1;
	cin >> n >> a >> b;

	for (int i = 0; i < n; i++) {
		ans *= 2;
		ans %= (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 + 7);
	}

	vector<vector<long long int> > v(n + 1, vector<long long int>(n + 1, 0));
	ans += v[n][a];
	vector<vector<long long int> > v(n + 1, vector<long long int>(n + 1, 0));
	ans += v[n][b];

	ans -= 1;
	ans %= (10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 * 10 + 7);

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:40: error: redeclaration of 'std::vector<std::vector<long long int> > v'
   33 |         vector<vector<long long int> > v(n + 1, vector<long long int>(n + 1, 0));
      |                                        ^
a.cc:31:40: note: 'std::vector<std::vector<long long int> > v' previously declared here
   31 |         vector<vector<long long int> > v(n + 1, vector<long long int>(n + 1, 0));
      |                                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1000000000;
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/ccYxsr4u.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/ccYxsr4u.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0xdd): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x143): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x15e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x176): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccYxsr4u.o
a.cc:(.text+0x1c5): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccYxsr4u.o
/tmp/ccYxsr4u.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/ccYxsr4u.o
a.cc:(.text+0x25b): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status