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

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

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

// テーブルを作る前処理
void COMinit(long long fac[MAX], long long finv[MAX], long long inv[MAX]) {
    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, long long fac[MAX], long long finv[MAX], long long inv[MAX]){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int	main(void)
{
    long long fac[MAX], finv[MAX], inv[MAX];

  	long long	n;
  	long long	a;
  	long long	b;
  	int num;
  	long long	i;
  	long long	ans;
  
  	num = scanf("%lld %lld %lld", &n, &a, &b);
	if (num != 3)
      	return (0);
  
  	COMinit(fac, finv, inv);
  	ans = 0;
  	for (i = 0; i < a; i++)
    {
      	ans += COM(n, i, fac, finv, inv);
  		ans = ans % MOD;
    }
  	for (i = a + 1; i < b; i++)
    {
      	ans += COM(n, i, fac, finv, inv);
      	ans = ans % MOD;
    }
    if (n > MAX)
    {  	for (i = b + 1; i < MAX; i++)
        {
      	    ans += COM(n, i, fac, finv, inv);
          	ans = ans % MOD;
        }
    }else{
        for (i = b + 1; i < n; i++)
        {
      	    ans += COM(n, i, fac, finv, inv);
          	ans = ans % MOD;
        }
    }
  	printf("%lld", ans % MOD);
  	return (0);
}


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

#include <stdio.h>

const int MAX = 200000;
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(void)
{
  	long long	n;
  	long long	a;
  	long long	b;
  	int num;
  	long long	i;
  	long long	ans;
  
  	num = scanf("%lld %lld %lld", &n, &a, &b);
	if (num != 3)
      	return (0);
  
  	COMinit();
  	ans = 0;
  	for (i = 0; i < a; i++)
    {
      	ans += COM(n, i);
  		ans = ans % MOD;
    }
  	for (i = a + 1; i < b; i++)
    {
      	ans += COM(n, i);
      	ans = ans % MOD;
    }
  	for (i = b + 1; i < MAX; i++)
    {
      	ans += COM(n, i);
      	ans = ans % MOD;
    }
  	printf("%lld", ans);
  	return (0);
}

Compiler output:
main.c:6:11: error: variably modified 'fac' at file scope
    6 | long long fac[MAX], finv[MAX], inv[MAX];
      |           ^~~
main.c:6:21: error: variably modified 'finv' at file scope
    6 | long long fac[MAX], finv[MAX], inv[MAX];
      |                     ^~~~
main.c:6:32: error: variably modified 'inv' at file scope
    6 | long long fac[MAX], finv[MAX], inv[MAX];
      |                                ^~~
Language: C++

#include <cstdio>

typedef unsigned long long ULL;

const ULL MOD=1e9+7;

ULL mut(ULL from, ULL to, ULL m) {
	ULL res=1;
	for(ULL i=from;i<=to;i++) {
		res*=i;
		res%=m;
	}
	return res;
}

ULL C(ULL n, ULL k, ULL m) {
	return (
		mut(k+1, n, m)/mut(1, n-k, m)
	);
}

ULL quickPow(ULL a, ULL b, ULL m) {
	ULL res=a;
	while(b!=1) {
		if(b%2) {
			res*=a;
			res%=m
			b-=1;
		}
		res*=res;
		res%=m;
		b/=2;
	}
	return res;
}

int main() {
	ULL n, a, b;
	scanf("%llu%llu%llu", &n, &a, &b);
	ULL resFull=quickPow(2,n,MOD)-1;
	ULL res=resFull-C(n,a,MOD)-C(n,b,MOD);
	printf("%llu\n", res);
	return 0;
}


Compiler output:
a.cc: In function 'ULL quickPow(ULL, ULL, ULL)':
a.cc:27:31: error: expected ';' before 'b'
   27 |                         res%=m
      |                               ^
      |                               ;
   28 |                         b-=1;
      |                         ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll MOD = 1e9+7;
ll n, a, b;

ll tich(ll a, ll b)
{
    ll t = 1;
    for (ll i = a; i <= b; ++i) t = t * i % MOD;
    return t;
}

ll Pow(ll a, ll n)
{
    if (n == 0) return 1;
    if (n == 1) return a;
    ll tmp = Pow(a, n/2);
    tmp = tmp * tmp % MOD;
    if (n % 2 != 0) tmp = tmp * a % MOD;
    return tmp;
}

ll C(ll n, ll k)
{
    ll C = 1;
    ll tu = tich(n-k+1, n);
    ll mau = Pow(tich(1, k), MOD-2);
    return tu * mau % MOD;
}

ll main()
{
    cin >> n >> a >> b;
    ll ans = Pow(2, n) - C(n, a) - C(n, b) - 1;
    if (ans < 0) ans += MOD;
    cout << ans;
    return 0;
}


Compiler output:
a.cc:35:1: error: '::main' must return 'int'
   35 | ll main()
      | ^~
Language: C++

#include<iostream>
using namespace std;
const long long P = pow(10, 9) + 7;
long long powmod(long long  x, long long  k);
int64_t comb(int64_t n, int64_t k) {
	int64_t x = 1;
	for (int i = n - k + 1; i <= n; i++) {
		x = x * i % P;
	}
	int64_t y = 1;
	for (int i = 1; i <= k; i++) {
		y = y * i % P;
	}
	//cout << "Y:"<<y << endl;
	y = powmod(y, P - 2);
	return x * y % P;
}

long long powmod(long long p, long long n) {
	long long ret = 1;
	while (n != 0) {
		if ((n & 1) == 1) {
			ret *= p;
            ret %= P;
			n--;
		}
		p *= p;
		p %= P;
		n /=2;
	}
	return ret;
}
int main() {
	long n, a, b;
	cin >> n >> a >> b;

	int all = powmod(2, n) - 1;
	int muri = comb(n, a) + comb(n, b);
	int ans = all - muri;
	while (ans < 0) {
		ans += P;
	}
	cout << ans;
	return 0;
}

Compiler output:
a.cc:3:21: error: 'pow' was not declared in this scope
    3 | const long long P = pow(10, 9) + 7;
      |                     ^~~
Language: C++


#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.xise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
deque<int> deq;
#define fi first
#define se second
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

ll N,M,H,W,K,Q,A,B;
string S;
//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
//const ll INF = 1LL << 60;
//typedef pair<ll,ll> P;
typedef pair<int, int> P;
bool chmx(int &a, int b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

bool chmn(int &a, int b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

ll f[1000000007];
ll n;
//int n,k とかしておく

ll pw(ll x, ll y){//euclidの互除法より
    ll a= 1;
    while(y){
        if(y&1){//奇数なら
            a = a*x%mod;
        }
        x = x*x%mod;
        y /= 2;
    }
    return a;
}

ll modinv(ll x){//逆元を求める
    return pw(x, mod - 2 );
}

ll comb(int n,int r){
    if(n<r){
        return 0;
    }
    return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod;
}//対combination//ただしfは用意してね

/*
ll hcomb(ll n,ll r){   
    if(n==0){
        return 0;
    } 
    if(r==1){
        return comb(n,r);
    }
    return comb(n+r-1,r);
}
*/

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

int main(){
    f[0]=1;
    rep2(i,1000000005){
        f[i]=f[i-1]*i;
        f[i]%=mod;
    }
    ll a,b;
    cin >> n >> a>>b;
    ll ans=RepeatSquaring(2,n,mod);
    //cerr<<ans<<endl;
    ans-=1;
    ans%=mod;
    //cerr<<(comb(n,a)%mod)<<endl;
    //cerr<<(comb(n,b)%mod)<<endl;
    ll temp=(comb(n,a))%mod+(comb(n,b))%mod;
    
    temp%=mod;
    //cerr<<temp<<endl;
    if(ans>temp){
        ans=ans-temp;
    }else{
        ans=ans+mod-temp;
    }
    ans%=mod;
    cout<<ans<<endl;
    return 0;
}



Compiler output:
/tmp/cc2TOpfI.o: in function `main':
a.cc:(.text+0x3a4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2TOpfI.o
a.cc:(.text+0x3e1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2TOpfI.o
a.cc:(.text+0x443): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2TOpfI.o
a.cc:(.text+0x491): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2TOpfI.o
collect2: error: ld returned 1 exit status
Language: C++


#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.xise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
deque<int> deq;
#define fi first
#define se second
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

ll N,M,H,W,K,Q,A,B;
string S;
//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
//const ll INF = 1LL << 60;
//typedef pair<ll,ll> P;
typedef pair<int, int> P;
bool chmx(int &a, int b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

bool chmn(int &a, int b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

ll f[2000000007];
ll n;
//int n,k とかしておく

ll pw(ll x, ll y){//euclidの互除法より
    ll a= 1;
    while(y){
        if(y&1){//奇数なら
            a = a*x%mod;
        }
        x = x*x%mod;
        y /= 2;
    }
    return a;
}

ll modinv(ll x){//逆元を求める
    return pw(x, mod - 2 );
}

ll comb(int n,int r){
    if(n<r){
        return 0;
    }
    return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod;
}//対combination//ただしfは用意してね

/*
ll hcomb(ll n,ll r){   
    if(n==0){
        return 0;
    } 
    if(r==1){
        return comb(n,r);
    }
    return comb(n+r-1,r);
}
*/

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

int main(){
    f[0]=1;
    rep2(i,1000000005){
        f[i]=f[i-1]*i;
        f[i]%=mod;
    }
    ll a,b;
    cin >> n >> a>>b;
    ll ans=RepeatSquaring(2,n,mod);
    //cerr<<ans<<endl;
    ans-=1;
    ans%=mod;
    //cerr<<(comb(n,a)%mod)<<endl;
    //cerr<<(comb(n,b)%mod)<<endl;
    ll temp=(comb(n,a))%mod+(comb(n,b))%mod;
    
    temp%=mod;
    //cerr<<temp<<endl;
    if(ans>temp){
        ans=ans-temp;
    }else{
        ans=ans+mod-temp;
    }
    ans%=mod;
    cout<<ans<<endl;
    return 0;
}



Compiler output:
/tmp/ccNHsLgw.o: in function `main':
a.cc:(.text+0x3a4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccNHsLgw.o
a.cc:(.text+0x3e1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccNHsLgw.o
a.cc:(.text+0x443): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccNHsLgw.o
a.cc:(.text+0x491): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccNHsLgw.o
collect2: error: ld returned 1 exit status
Language: C++


#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.xise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
deque<int> deq;
#define fi first
#define se second
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

ll N,M,H,W,K,Q,A,B;
string S;
//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
//const ll INF = 1LL << 60;
//typedef pair<ll,ll> P;
typedef pair<int, int> P;
bool chmx(int &a, int b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

bool chmn(int &a, int b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

ll f[2000000007];
ll n;
//int n,k とかしておく

ll pw(ll x, ll y){//euclidの互除法より
    ll a= 1;
    while(y){
        if(y&1){//奇数なら
            a = a*x%mod;
        }
        x = x*x%mod;
        y /= 2;
    }
    return a;
}

ll modinv(ll x){//逆元を求める
    return pw(x, mod - 2 );
}

ll comb(int n,int r){
    if(n<r){
        return 0;
    }
    return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod;
}//対combination//ただしfは用意してね

/*
ll hcomb(ll n,ll r){   
    if(n==0){
        return 0;
    } 
    if(r==1){
        return comb(n,r);
    }
    return comb(n+r-1,r);
}
*/

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

int main(){
    f[0]=1;
    rep2(i,2000000005){
        f[i]=f[i-1]*i;
        f[i]%=mod;
    }
    ll a,b;
    cin >> n >> a>>b;
    ll ans=RepeatSquaring(2,n,mod);
    //cerr<<ans<<endl;
    ans-=1;
    ans%=mod;
    //cerr<<(comb(n,a)%mod)<<endl;
    //cerr<<(comb(n,b)%mod)<<endl;
    ll temp=(comb(n,a))%mod+(comb(n,b))%mod;
    
    temp%=mod;
    //cerr<<temp<<endl;
    if(ans>temp){
        ans=ans-temp;
    }else{
        ans=ans+mod-temp;
    }
    ans%=mod;
    cout<<ans<<endl;
    return 0;
}



Compiler output:
/tmp/ccQ0piuL.o: in function `main':
a.cc:(.text+0x3a4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQ0piuL.o
a.cc:(.text+0x3e1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQ0piuL.o
a.cc:(.text+0x443): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQ0piuL.o
a.cc:(.text+0x491): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccQ0piuL.o
collect2: error: ld returned 1 exit status
Language: C++


#define _GLIBCXX_DEBUG//TLEの原因になるので注意！！！！！！！！！！！
#include<cmath>
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> arr;
stack<int> st;
queue<int> qu;
queue<pair<int,int> > qu2;
priority_queue<int> pq;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define rep2(i,n) for(int i=1; i<=(int)(n); i++)
#define mins(x,y) x=min(x,y)
#define maxs(x,y) x=max(x,y)
typedef set<int> set_t;
typedef set<string> set_g;
typedef complex<double> xy_t;
static const int NIL = -1;
static const int INF = 1000000007;
#define mp make_pair
#define sz(x) int(x.xise())
#define mod 1000000007
#define reps(i,s,n) for(int i = s; i < n; i++)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
deque<int> deq;
#define fi first
#define se second
//#define int long long

//cerrはコメントアウトしなくても通る//ただしTLEを引き起こすことがある

ll N,M,H,W,K,Q,A,B;
string S;
//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
//const ll INF = 1LL << 60;
//typedef pair<ll,ll> P;
typedef pair<int, int> P;
bool chmx(int &a, int b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

bool chmn(int &a, int b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

ll f[2000000007];
ll n;
//int n,k とかしておく

ll pw(ll x, ll y){//euclidの互除法より
    ll a= 1;
    while(y){
        if(y&1){//奇数なら
            a = a*x%mod;
        }
        x = x*x%mod;
        y /= 2;
    }
    return a;
}

ll modinv(ll x){//逆元を求める
    return pw(x, mod - 2 );
}

ll comb(int n,int r){
    if(n<r){
        return 0;
    }
    return f[n] * modinv(f[r])%mod*modinv(f[n-r])%mod;
}//対combination//ただしfは用意してね

/*
ll hcomb(ll n,ll r){   
    if(n==0){
        return 0;
    } 
    if(r==1){
        return comb(n,r);
    }
    return comb(n+r-1,r);
}
*/

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

int main(){
    f[0]=1;
    rep2(i,2000000005){
        f[i]=f[i-1]*i;
        f[i]%=mod;
    }
    ll a,b;
    cin >> n >> a>>b;
    ll ans=RepeatSquaring(2,n,mod);
    //cerr<<ans<<endl;
    ans-=1;
    ans%=mod;
    //cerr<<(comb(n,a)%mod)<<endl;
    //cerr<<(comb(n,b)%mod)<<endl;
    ll temp=(comb(n,a))%mod+(comb(n,b))%mod;
    
    temp%=mod;
    //cerr<<temp<<endl;
    if(ans>temp){
        ans=ans-temp;
    }else{
        ans=ans+mod-temp;
    }
    ans%=mod;
    cout<<ans<<endl;
    return 0;
}



Compiler output:
/tmp/ccKIgQAZ.o: in function `main':
a.cc:(.text+0x3a4): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccKIgQAZ.o
a.cc:(.text+0x3e1): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccKIgQAZ.o
a.cc:(.text+0x443): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccKIgQAZ.o
a.cc:(.text+0x491): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccKIgQAZ.o
collect2: error: ld returned 1 exit status
Language: C++

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

ll pow(ll a, ll n) {
	ll tmp = 1;
	while (n > 0) {
		if (n & 1) tmp = tmp*a;
		a = a*a;
		n >>= 1;
	}
	return tmp;
}

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

ll mod = 1000000007;

vector<ll> fac(1000000001);
vector<ll> ifac(1000000001);

ll comb(ll a, ll b){ //aCbをmod計算
    if(a == 0 && b == 0)return 1;
    if(a < b || a < 0)return 0;
    ll tmp = ifac[a-b]* ifac[b] % M;
    return tmp * fac[a] % M;
}

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

	ll tot, a_ex, b_ex;
	tot = modpow(2, n, mod);
	
}


Compiler output:
a.cc: In function 'll modpow(ll, ll, ll)':
a.cc:18:42: error: 'm' was not declared in this scope
   18 |                 if (n & 1) tmp = tmp*a % m;
      |                                          ^
a.cc:19:27: error: 'm' was not declared in this scope
   19 |                 a = a*a % m;
      |                           ^
a.cc: In function 'll comb(ll, ll)':
a.cc:33:35: error: 'M' was not declared in this scope
   33 |     ll tmp = ifac[a-b]* ifac[b] % M;
      |                                   ^
Language: C++

#include<iostream>
using namespace std;
#define ll long long
#define const 1000000007
 
ll nCa(ll n, ll a, ll q) {
  ll x = 1; ll y = 1;
  for (int i = 0; i < a; i++){
    x *= (n - i) ;
    y *= (a - i) ;
  }
  return (x/y) % q;
}
 
ll Mod(ll n, ll m, ll q){
  if (m == 0) return 1;
  if (m % 2 == 0) return Mod(n * n % q, m/2, q);
  if (m % 2 == 1) return n * Mod(n, m-1,q) % q;
}
 
int main(){
  ll n, a, b;
  cin >> n >> a >> b;
  ll num = (Mod(2,n,const) - 1) % const;
  num = num - nCa(n,a,const);
  num = (num - nCb(n,b,const))% const;
  cout << num << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:26:16: error: 'nCb' was not declared in this scope; did you mean 'nCa'?
   26 |   num = (num - nCb(n,b,const))% const;
      |                ^~~
      |                nCa
a.cc: In function 'long long int Mod(long long int, long long int, long long int)':
a.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
#define ll long long
#define const 1000000007

ll nCa(ll n, ll a, ll q) {
  ll x = 1; ll y = 1;
  for (int i = 0; i < a; i++){
    x *= (n - i) ;
    y *= (a - i) ;
  }
  return (x/y) % q;
}

ll Mod(ll n, ll m, ll q){
  if (m == 0) return 1;
  if (m % 2 == 0) return Mod(n * n % q, m/2, q);
  if (m % 2 == 1) return n * Mod(n, m-1,q) % q;
}

int main(){
  ll n, a, b;
  cin >> n >> a >> b;
  ll num = (Mod(2,n,const) - 1) % const;
  num = num - nCa(n,a,q);
  num = (num - nCb(n,b,q))% q;
  cout << num << endl;
}
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: 'q' was not declared in this scope
   25 |   num = num - nCa(n,a,q);
      |                       ^
a.cc:26:16: error: 'nCb' was not declared in this scope; did you mean 'nCa'?
   26 |   num = (num - nCb(n,b,q))% q;
      |                ^~~
      |                nCa
a.cc: In function 'long long int Mod(long long int, long long int, long long int)':
a.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
#define const 1000000007
#define ll long long

ll Mod(ll n, ll m, ll q){
  if (m == 0) return 1;
  if (m % 2 == 0) return Mod(n * n % q, m/2, q);
  if (m % 2 == 1) return n * Mod(n, m-1, q) % q;
}

ll Kaizyo(ll n, ll q){
  if (n == 1|| n == 0) return 1;
  if ( n > 1 ) return n * Kaizyo(n-1 , q) % q;
}

ll Combi(ll n, ll a, ll q){
  ll prod = Kaizyo(n,q); 
  for (int i = 0; i < q - 2; i++){
    prod *= Kaizyo(a,q)* Kaizyo(n-a,q) % q;
  } 
  return prod;
}

int main(){
  ll n, a, b;
  cin >> n >> a >> b;
  
  ll num;
  num = (Mod(2, n, const) - 1) % const;
  num = (num - Combi(n,a,q)) % q;
  num = (num - Combi(n,a,q)) % q;
  
  cout << num << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:31:26: error: 'q' was not declared in this scope
   31 |   num = (num - Combi(n,a,q)) % q;
      |                          ^
a.cc: In function 'long long int Mod(long long int, long long int, long long int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
a.cc: In function 'long long int Kaizyo(long long int, long long int)':
a.cc:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

// mod. m での a の逆元 a^{-1} を計算する
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;
}

// a ÷ b mod. MOD を計算してみる
int main() {
		long long n,a,b;

    const int MOD = 1000000007;

    long long a = 12345678900000;
    long long b = 100000;

    // a を 10000000007 で割ってから b の逆元をかけて計算
    a %= MOD;
    cout << a * modinv(b, MOD) % MOD << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: redeclaration of 'long long int a'
   23 |     long long a = 12345678900000;
      |               ^
a.cc:19:29: note: 'long long int a' previously declared here
   19 |                 long long n,a,b;
      |                             ^
a.cc:24:15: error: redeclaration of 'long long int b'
   24 |     long long b = 100000;
      |               ^
a.cc:19:31: note: 'long long int b' previously declared here
   19 |                 long long n,a,b;
      |                               ^
Language: C++

#include <iostream>
using namespace std;
static const int64_t MOD = 1e9 + 7;
template<class T>
T pow(T x, T n, const T& p) {
    T ret = 1;
    while (n > 0) {
        if (n & 1) ret = (ret * x) % p;
        x = (x * x) % p;
        n >>= 1;
    }
    return ret;
}
template <class T>
T comb(T a, T b, const T& p) {
    T ret = 1;
    for (T i = b; i >= 1; i--) ret = (ret * i) % p;
    ret = pow(ret, p - 2, p);
    for (T i = a; i >= a - b + 1; i--) ret = (ret * i) % p;
    return ret;
}
int main() {
    int64_t n, a, b;
    cin >> n >> a >> b;
    auto t = pow(2ll, n, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1;
    cout << t + (t >= 0 ? 0 : MOD) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: no matching function for call to 'pow(long long int, int64_t&, const int64_t&)'
   25 |     auto t = pow(2ll, n, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1;
      |              ~~~^~~~~~~~~~~~~
a.cc:5:3: note: candidate: 'template<class T> T pow(T, T, const T&)'
    5 | T pow(T x, T n, const T& p) {
      |   ^~~
a.cc:5:3: note:   template argument deduction/substitution failed:
a.cc:25:17: note:   deduced conflicting types for parameter 'T' ('long long int' and 'long int')
   25 |     auto t = pow(2ll, n, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1;
      |              ~~~^~~~~~~~~~~~~
Language: C++

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

int64_t MOD = 1e9+7;

//---------- べき乗 ----------
int64_t power(int64_t a, int64_t n){
    if(n == 0) return 1;

    int64_t res = 1;
    while(n > 0){
        if(n % 2 == 1) res = res * a % MOD;
        a = a * a % MOD;
        n /= 2;
    }

    return res;
}

//---------- 逆元 ----------
int64_t inv(int64_t a){
    return power(a, MOD-2);
}


//--------- 組み合わせ ---------
int64_t comb(int64_t n, int64_t r){
  int64_t bunbo = 1, bunshi = 1;

  for(int i=0; i<r; i++){
    bunbo = bunbo * (r-i) % MOD;
    bunshi = bunshi * (n-i) % MOD;
  }

  return bunshi * inv(bunbo) % MOD;
}


int main(){ 
  int64_t N, A, B;
  cin >> N >> A >> B;

  int64_t ans = power(2, N) - comb(N, A) - comb(N, B) - 1;
  while(ans < 0) ans += MOD;

  cout << ans << endl;
}

Compiler output:
a.cc:3:20: error: expected ';' before 'int64_t'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | 
    5 | int64_t MOD = 1e9+7;
      | ~~~~~~~
Language: C++

int64_t MOD = 1e9+7;

//---------- べき乗 ----------
int64_t power(int64_t a, int64_t n){
    if(n == 0) return 1;

    int64_t res = 1;
    while(n > 0){
        if(n % 2 == 1) res = res * a % MOD;
        a = a * a % MOD;
        n /= 2;
    }

    return res;
}

//---------- 逆元 ----------
int64_t inv(int64_t a){
    return power(a, MOD-2);
}


//--------- 組み合わせ ---------
int64_t comb(int64_t n, int64_t r){
  int64_t bunbo = 1, bunshi = 1;

  for(int i=0; i<r; i++){
    bunbo = bunbo * (r-i) % MOD;
    bunshi = bunshi * (n-i) % MOD;
  }

  return bunshi * inv(bunbo) % MOD;
}


int main(){ 
  int64_t N, A, B;
  cin >> N >> A >> B;

  int64_t ans = power(2, N) - comb(N, A) - comb(N, B) - 1;
  while(ans < 0) ans += MOD;

  cout << ans << endl;
}

Compiler output:
a.cc:1:1: error: 'int64_t' does not name a type
    1 | int64_t MOD = 1e9+7;
      | ^~~~~~~
a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | int64_t MOD = 1e9+7;
a.cc:4:1: error: 'int64_t' does not name a type
    4 | int64_t power(int64_t a, int64_t n){
      | ^~~~~~~
a.cc:4:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:18:1: error: 'int64_t' does not name a type
   18 | int64_t inv(int64_t a){
      | ^~~~~~~
a.cc:18:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:24:1: error: 'int64_t' does not name a type
   24 | int64_t comb(int64_t n, int64_t r){
      | ^~~~~~~
a.cc:24:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc: In function 'int main()':
a.cc:37:3: error: 'int64_t' was not declared in this scope
   37 |   int64_t N, A, B;
      |   ^~~~~~~
a.cc:37:3: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:38:3: error: 'cin' was not declared in this scope
   38 |   cin >> N >> A >> B;
      |   ^~~
a.cc:38:10: error: 'N' was not declared in this scope
   38 |   cin >> N >> A >> B;
      |          ^
a.cc:38:15: error: 'A' was not declared in this scope
   38 |   cin >> N >> A >> B;
      |               ^
a.cc:38:20: error: 'B' was not declared in this scope
   38 |   cin >> N >> A >> B;
      |                    ^
a.cc:40:10: error: expected ';' before 'ans'
   40 |   int64_t ans = power(2, N) - comb(N, A) - comb(N, B) - 1;
      |          ^~~~
      |          ;
a.cc:41:9: error: 'ans' was not declared in this scope
   41 |   while(ans < 0) ans += MOD;
      |         ^~~
a.cc:41:25: error: 'MOD' was not declared in this scope
   41 |   while(ans < 0) ans += MOD;
      |                         ^~~
a.cc:43:3: error: 'cout' was not declared in this scope
   43 |   cout << ans << endl;
      |   ^~~~
a.cc:43:11: error: 'ans' was not declared in this scope
   43 |   cout << ans << endl;
      |           ^~~
a.cc:43:18: error: 'endl' was not declared in this scope
   43 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll = long long;

const ll M = 1e9 + 7;

ll power(ll a, ll b) {
  ll x = 1, y = a;
  while (b > 0) {
    if (b % 2) x = (x * y) % M;
    y = (y * y) % M;
    b /= 2;
  }
  return x % M;
}

ll inv(ll a) {
  return power(a, M - 2);
}

vector<ll> f;

ll comb(ll n, ll r) {
  return ((f[n] * inv(f[r])) % M * inv(f[n - r])) % M;

int main() {
  ll n, a, b; cin >> n >> a >> b;
  ll ans = (power(2, n) - 1 + M) % M;
  f.resize(n);
  f[0] = 1;
  for (int i = 1; i <= n; i++) {
    f[i] = (f[i - 1] * i) % M;
  }
  ans = (ans - comb(n, a) + M) % M;
  ans = (ans - comb(n, b) + M) % M;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'll comb(ll, ll)':
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main() {
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main() {
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:12: error: a function-definition is not allowed here before '{' token
   26 | int main() {
      |            ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:23:21: note: to match this '{'
   23 | ll comb(ll n, ll r) {
      |                     ^
Language: Java

import java.util.Scanner;

public class abc157d {
	static final int M = 1000000007;

	public static void main(String[] args) throws Exception {
		final Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		int a = sc.nextInt();
		int b = sc.nextInt();
		long answer = pow(2, n, M) - 1;
		answer = ((answer - f(n, a)) % M ) % M;
		answer = ((answer - f(n, b)) % M ) % M;
		System.out.println(answer);
	}

	private static long f(long n, int a) {
		long[] x = new long[a];
		long[] y = new long[a];
		x[0] = n;
		y[0] = a;

		for (int i = 1; i < a; i++) {
			x[i] = (x[i - 1] * (n - i)) % M;
			y[i] = (y[i - 1] * (a - i)) % M;
		}

		return (x[a - 1] * pow(y[a - 1], M - 2, M)) % M;
	}

	private static long pow(long x, long n, long M) {
		long a = 1;
		while (n > 0) {
			if ((n & 1) == 1) a = (a * x) % M;
			x = (x * x) % M;
			n >>= 1;
		}
		return a;
	}
}


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

#include<stdio.h>
int c(int a,int b)
{
  int i;
  int P;
  for(i=0;i<b;i++)
  {
    P=(a-i)/(b-i);
  }
  return P;
}
int main()
{
  int N,a,b;
  scanf("%d %d %d",&N,&a,&b);
  int i;
  int c=1;
  for(i=0;i<N;i++)
  {
    c=c*2;
  }
  c=(c-c(a,b))/1000000007;
  printf("%d",c);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:22:8: error: called object 'c' is not a function or function pointer
   22 |   c=(c-c(a,b))/1000000007;
      |        ^
main.c:17:7: note: declared here
   17 |   int c=1;
      |       ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bitset>
using namespace std;
#define INF 1000000007
#define LINF 100000000000000007
#define MOD 1000000007
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define repb(i, n) for (int i = n - 1; i >= 0; i--)
#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
typedef long long ll;
typedef pair<int,int> P;
struct edge{int to,cost;};
int ceil2(int a,int b){if(a%b){return a/b+1;}else{return a/b;}}
using namespace std;

int n,k,ans;
int extgcd(int a,int b,int &x,int &y){
	int g=a;
	x=1,y=0;
	if(b!=0){
		g=extgcd(b,a%b,y,x);
		y-=(a/b)*x;
	}
	return g;
}
 
// 逆元
int mod_inverse(int a,int m){
	int x, y;
	extgcd(a,m,x,y);
	return (m+x%m)%m;
}
 
// 階乗
std::vector<int>fact;
void mod_fact(int n, int m){//N,MOD
	fact.resize(n+1);
	fact[0]=1;
	for(int i=1;i<=n;i++){
		fact[i]=fact[i-1]*i%m;
	}
}
 
// nCk mod p
int mod_nCr(int n, int k, int m){
	if(n<k)return 0;
	return fact[n]*mod_inverse(fact[k]*fact[n-k]%m,m)%m;
}
int mod_pow(int a, int n, int p){
	if(n==1)return a%p;
	if(n%2==1)return a*mod_pow(a,n-1,p)%p;
	int num=mod_pow(a,n/2,p);
	return num*num%p;
}
int a,b;
signed main(){
	cin>>n>>a>>b;
	ans=mod_pow(2,n,MOD);
	int num=1;
	rep(i,a){
		num*=n-i;
		num%=MOD;
	}
	int num2=1;
	rep(i,a){
		num2*=i+1;
        num2%=MOD;
	}
	int extra1=num*mod_inverse(num2,MOD)%MOD;
    extra1%=MOD;
	int num3=1;
	rep(i,b){
		num3*=n-i;
		num3%=MOD;
	}
	int num4=1;
	rep(i,b){
		num4*=i+1;
        num4%=MOD;
	}
	int extra2=num3*mod_inverse(num4,MOD)%MOD;
    extra2%=MOD
	ans-=extra1+extra2+1;
	if(ans>=0)cout<<ans<<endl;
	else cout<<ans+MOD<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:106:9: error: expected ';' before 'ans'
  106 |         ans-=extra1+extra2+1;
      |         ^~~
Language: C++

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

const int MOD = 1000000007;

/*
int64_t modpow(int64_t x, int64_t n) {
    x = x%MOD;
    if(n==0) return 1;  //再帰の終了条件

    else if(n%2==1) {
        return (x*modpow(x, n-1))%MOD;  //nが奇数ならnを1ずらす
    }
    else return modpow((x*x)%MOD, n/2)%MOD;  //nが偶数ならnが半分になる
}
*/

int64_t modpow(int64_t x, int64_t n) {
    int64_t ret = 1;
    while (n != 0) {
        if (n & 1 == 1) {
            result *= x;
            result %= MOD;
        }
        x *= x;
        x %= MOD;
        n >>= 1;
    }
    return ret;
}

int64_t comb(int64_t n, int64_t k) {
    int64_t x = 1;
    for(int i=n-k+1; i<=n; i++) {
        x = x*i%MOD;
    }

    int64_t y = 1;
    for(int i=1; i<=k; i++) {
        y = y*i%MOD;
    }
    y = modpow(y, MOD-2);

    return x*y%MOD;
}

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

    int all = modpow(2,n) -1;
    int muri = comb(n,a) + comb(n,b);

    int ans = all - muri;
    while(ans<0) {
        ans += MOD;
    }

    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int64_t modpow(int64_t, int64_t)':
a.cc:22:13: error: 'result' was not declared in this scope
   22 |             result *= x;
      |             ^~~~~~
Language: C

typedef long long int ll;

ll PowMod_RepeatSquaring(ll N, ll P, ll M){
	if (P == 0){
		return 1;
	}else if (P % 2 == 0){
		long int t = PowMod_RepeatSquaring(N, P/2, M); 
		return t * t % M;
	}else{
		return N * PowMod_RepeatSquaring(N, P - 1, M) % M;
	}
}  

ll comb(ll n, ll k, ll M){
	if (n < k) return 0;
	else if (n < 0 || k < 0) return 0;
  	else if (k == 0 || k == 1) return n;
  	if (k > n / 2) 	k = n - k;
    return comb(n, k - 1, M) * (n - k + 1) / k % M;
}

#include <stdio.h>
int main(){
  ll n, a, b, ans, M;
  M = 1000000007;
  scanf("%lld%lld%lld", &n, &a, &b);
  ans = (PowMod_RepeatSquaring(2, n, M) - comb(n, a, M) - comb(n, b, M) - 1) % M
  printf("%lld", ans);
}


Compiler output:
main.c: In function 'main':
main.c:27:81: error: expected ';' before 'printf'
   27 |   ans = (PowMod_RepeatSquaring(2, n, M) - comb(n, a, M) - comb(n, b, M) - 1) % M
      |                                                                                 ^
      |                                                                                 ;
   28 |   printf("%lld", ans);
      |   ~~~~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
long long n,mod=1000000007;

long long combmod(int p){
  long long a=1;
  for(int i=1;i<=p;i++){
    a*=(n-i+1);
    if(a>mod){a=a%mod;}
  }
  long long b=1;
  for(int i=1;i<=p;i++){
    b*=i;
    if(b>mod){b=b%mod;}
  }
  
  long long ans;
  while(a%b!=0){
    a+=mod;
  }
  ans=a/b;
  
  return ans;
}

int main(){
  long long a,b,ans=1;
  cin>>n>>a>>b;
  
  if(n%2==0){
    for(int i=0;i<n/2;i++){
    ans*=4;
    if(ans>mod){ans=ans%mod;}
  }else{
      for(int i=0;i<n/2;i++){
        ans*=4;
        if(ans>mod){ans=ans%mod;}
      }
      ans*=2;ans=ans%mod;
    }
  
  ans=ans-combmod(a)-combmod(b)-1;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:4: error: expected '}' before 'else'
   35 |   }else{
      |    ^~~~
a.cc:31:13: note: to match this '{'
   31 |   if(n%2==0){
      |             ^
Language: C

long int fac_mod(long int N, long int M){
	if (N == 0) return 1;
	return fac_mod(N - 1, M) * N % M;
} 

long int PowMod_RepeatSquaring(long int N, long int P, long int M){
	if (P == 0){
		return 1;
	}else if (P % 2 == 0){
		long int t = PowMod_RepeatSquaring(N, P/2, M); 
		return t * t % M;
	}else{
		return N * PowMod_RepeatSquaring(N, P - 1, M) % M;
	}
}  

long int inv_Felmat(long int a, long int M){
	return PowMod_RepeatSquaring(a, M - 2, M);
}

long int fac_inv_Felmat(long int a, long int M){
	if (a == 0) return 1;
	long int t = 1;
	for (long int i = 2; i <= a; i++)
		t *= inv_Felmat(i, M) % M;
	return t;
}

long int comb_mod(long int n, long int k, long int M){
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac_mod(n, M) * (fac_inv_Felmat(n - k, M) * fac_inv_Felmat(k, M) % M) % M;
}
long int n, a, b, M, ans;
M = 1000000007;
#include <stdio.h>
int main(){
  scanf("%ld%ld%ld", &n, &a, &b);
  ans = (PowMod_RepeatSquaring(2, n, M) - comb_mod(n, a, M) - comb_mod(n, b, M) - 1) % M;
  printf("%ld", ans);
}

Compiler output:
main.c:35:1: warning: data definition has no type or storage class
   35 | M = 1000000007;
      | ^
main.c:35:1: error: type defaults to 'int' in declaration of 'M' [-Wimplicit-int]
main.c:35:1: error: conflicting types for 'M'; have 'int'
main.c:34:19: note: previous declaration of 'M' with type 'long int'
   34 | long int n, a, b, M, ans;
      |                   ^
Language: C

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

const int N=1000000007;

char str[100]="";

unsigned long long m(long long x,long long y)  //
{
	unsigned long long sum=1;
	while(y)
	{
		if(y%2==1)
		{
			sum*=x;
		}
		y/=2;
		x=x*x;
		x=x%N; 
		sum=sum%N;
	}
	
	return sum;
	
}

/*unsigned long long two(int x,int y) 
{
	unsigned long long z=x;
	itoa(y,str,2);
	for(int i=1;i<=strlen(str);i++)
	{
		if(str[i]=='0'){
		  z=z*z;
		  z=z%N;
		} 
		if(str[i]=='1'){
		  z=x*z*z;
		  z=z%N;
		}  
	}
	
	return z%N;
	
}*/ 

unsigned long long sub(int x,int y)
{
	unsigned long long total=1,i;
	for(i=0;i<=x-1;i++)
	{
		//total*=m(y-i,1);
		total=total*(y-i)%N; 
		total%=N; 
	}
	
	for(i=0;i<=x-1;i++)
	{
	   total*=m(x-i,1000000005);
	   total%=N;	
	}
	
	total%=N;
	
	return total;
	
}

int main()
{
	int n,a,b;
	
	cin>>n>>a>>b;
	
	unsigned long long s=m(2,n);
	
    s--;
    
    unsigned long long aa=sub(a,n);
    
    unsigned long long bb=sub(b,n);
    cout<<s<<endl;
    cout<<aa<<endl;
    cout<<bb<<endl;
    if(s>=aa)
      s=s-aa;
    else{
	  s+=N;
	  s=s-aa;
    }
    s=s%N;
	
	if(s>=bb)
	  s=s-bb;
	else{
	  s+=N;
	  s=s-bb;
	}
	 
    
    s=s%N;
    
    cout<<s<<endl;
    
    return 0;
    
} 

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

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

const int N=1000000007;

char str[100]="";

unsigned long long m(int n)
{
	unsigned long long sum=1,a=2;
	while(n)
	{
		if(n%2==1)
		{
			sum*=a;
		}
		n/=2;
		a=a*a;
		a=a%N; 
		sum=sum%N;
	}
	
	return sum;
	
}

unsigned long long two(int x,int y) 
{
	unsigned long long z=x;
	itoa(y,str,2);
	for(int i=1;i<=strlen(str);i++)
	{
		if(str[i]=='0'){
		  z=z*z;
		  z=z%N;
		} 
		if(str[i]=='1'){
		  z=x*z*z;
		  z=z%N;
		}  
	}
	
	return z%N;
	
}

unsigned long long sub(int x,int y)
{
	unsigned long long total=1,i;
	for(i=0;i<=x-1;i++)
	{
		total*=two(y-i,1);
		total%=N; 
	}
	
	for(i=0;i<=x-1;i++)
	{
	   total*=two(x-i,1000000005);
	   total%=N;	
	}
	
	total%=N;
	
	return total;
	
}

int main()
{
	int n,a,b;
	
	cin>>n>>a>>b;
	
	unsigned long long s=m(n);
	
    s--;
    
    unsigned long long aa=sub(a,n);
    
    unsigned long long bb=sub(b,n);
    
    if(s>=aa)
      s=s-aa;
    else{
	  s+=N;
	  s=s-aa;
    }
    s=s%N;
	
	if(s>=bb)
	  s=s-bb;
	else{
	  s+=N;
	  s=s-bb;
	}
	 
    
    s=s%N;
    
    cout<<s<<endl;
    
    return 0;
    
} 

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

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

const int N=1000000007;

char str[100]="";

unsigned long long m(int n)
{
	unsigned long long sum=1,a=2;
	while(n)
	{
		if(n%2==1)
		{
			sum*=a;
		}
		n/=2;
		a=a*a;
		a=a%N; 
		sum=sum%N;
	}
	
	return sum;
	
}

unsigned long long two(int x,int y) 
{
	unsigned long long z=x;
	itoa(y,str,2);
	for(int i=1;i<=strlen(str);i++)
	{
		if(str[i]=='0'){
		  z=z*z;
		  z=z%N;
		} 
		if(str[i]=='1'){
		  z=x*z*z;
		  z=z%N;
		}  
	}
	
	return z%N;
	
}

unsigned long long sub(int x,int y)
{
	unsigned long long total=1,i;
	for(i=0;i<=x-1;i++)
	{
		total*=two(y-i,1);
		total%=N; 
	}
	
	for(i=0;i<=x-1;i++)
	{
	   total*=two(x-i,1000000005);
	   total%=N;	
	}
	
	total%=N;
	
	return total;
	
}

int main()
{
	int n,a,b;
	
	cin>>n>>a>>b;
	
	unsigned long long s=m(n);
	
    s--;
    
    unsigned long long aa=sub(a,n);
    
    unsigned long long bb=sub(b,n);
    
    if(s>=aa)
      s=s-aa;
    else{
	  s+=N;
	  s=s-aa;
    }
    s=s%N;
	
	if(s>=bb)
	  s=s-bb;
	else{
	  s+=N;
	  s=s-bb;
	}
	 
    
    s=s%N;
    
    cout<<s<<endl;
    
    return 0;
    
} 

Compiler output:
a.cc: In function 'long long unsigned int two(int, int)':
a.cc:30:9: error: 'itoa' was not declared in this scope
   30 |         itoa(y,str,2);
      |         ^~~~
Language: C

#include <stdio.h>
#include <math.h>
typedef long long ll;
#define mod 1e9+7

ll fact(ll n){
    ll ans = n;
    for(ll i = n-1; i > 1; i--){
        ans = ans*i;
    }
    return ans;
}

ll combination(ll n,ll r){
    

    if(n < 0||r<0||n<r){
        return 0;
    }

    if(n==r||!r){
        return 1;
    }

    /*if(dp[n][r]){
        return combination(n,r);
    }*/

    
    
    return combination(n-1,r)%mod+combination(n-1,r-1)%mod;
}

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

    

    ll temp = ((ll)pow(2,n))%mod-combination(n,a)-combination(n,b);

    printf("%lld\n",temp);

    return 0;
}

Compiler output:
main.c: In function 'combination':
main.c:31:30: error: invalid operands to binary % (have 'll' {aka 'long long int'} and 'double')
   31 |     return combination(n-1,r)%mod+combination(n-1,r-1)%mod;
      |            ~~~~~~~~~~~~~~~~~~^
      |            |
      |            ll {aka long long int}
main.c:31:55: error: invalid operands to binary % (have 'll' {aka 'long long int'} and 'double')
   31 |     return combination(n-1,r)%mod+combination(n-1,r-1)%mod;
      |                                   ~~~~~~~~~~~~~~~~~~~~^
      |                                   |
      |                                   ll {aka long long int}
main.c: In function 'main':
main.c:40:29: error: invalid operands to binary % (have 'long long int' and 'double')
   40 |     ll temp = ((ll)pow(2,n))%mod-combination(n,a)-combination(n,b);
      |               ~~~~~~~~~~~~~~^
      |                |
      |                long long int
Language: Java



import java.util.*;

public class D {
    long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        long res = (long) (fastExp(2, n) - 1);
        res -= (choose(n, a));
        if (res < 0) {
            res += 1000000007;
            res = res % 1000000007;
        }
        res -= (choose(n,b));
        if (res < 0) {
            res += 1000000007;
            res = res % 1000000007;
        }
        System.out.println(res);
    }

    static long choose(int a, int b) {
        long mod = 1000000007;
        long top = 1;
        long bot = 1;
        if ((a - b) > b) {
            for (int i=((a-b)+1);i<=a ;i++) {
                top = (top * i) % mod;
            }
            for (int j=1; j<=b;j++) {
                bot = (bot*j) % mod;
            }
        } else {
            for (int j=(b+1);j<=a ;j++) {
                top = (top*j) % mod;
            }
            for (int i=1;i<=(a-b);i++) {
                bot = (bot*i) % mod;
            }
        }
        return ((top * (fastExp(bot, 1000000005))) % mod);
    }

    static long fastExp(long base, long power) {
        long mod = 1000000007;

        if (power == 0) {
            return 1;
        }
        long ans = fastExp(base, (power/2));
        if (power % 2 == 1) {
            long temp = (ans*base) % mod;
            return (temp*ans) % mod;
        } else {
            return (ans*ans) % mod;
        }
    }
}


Compiler output:
Main.java:5: 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>
#define INF 2147483647
#define _MATH_DEFINES_DEFINED
#define int long long
#define mod 1e9+7
#pragma GCC optimize("O2")
using namespace std;
inline int read(void){
	int f=1,n=0;char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)){n=n*10+(c-'0');c=getchar();}
	return f*n;
}
signed main(void){
	int n=read(),a=read(),b=read(),ans=0;
	vector<int> vec;
	vec.push_back(1);
	for(int i=1;i<=n;i++) vec.push_back(vec[i-1]*i);
	for(int i=1;i<=(n-1)/2;i++){
		int k=vec[n]/vec[n-i]/i;
		if(i!=min(a,n-a)) ans=(ans+k)%mod;
		if(i!=min(b,n-b)) ans=(ans+k)%nod;
	}
	if((n-1)%2==1){
		int k=vec[n]/vec[n-((n-1)/2+1)]/((n-1)/2+1);
		if(((n-1)/2+1)!=min(a,n-a)&&((n-1)/2+1)!=min(b,n-b)) ans=(ans+k)%mod;
	}
	cout<<(ans+1)%mod<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:46: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   21 |                 if(i!=min(a,n-a)) ans=(ans+k)%mod;
      |                                       ~~~~~~~^
      |                                           |
      |                                           long long int
a.cc:22:47: error: 'nod' was not declared in this scope; did you mean 'mod'?
   22 |                 if(i!=min(b,n-b)) ans=(ans+k)%nod;
      |                                               ^~~
      |                                               mod
a.cc:26:81: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   26 |                 if(((n-1)/2+1)!=min(a,n-a)&&((n-1)/2+1)!=min(b,n-b)) ans=(ans+k)%mod;
      |                                                                          ~~~~~~~^
      |                                                                              |
      |                                                                              long long int
a.cc:28:22: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   28 |         cout<<(ans+1)%mod<<endl;
      |               ~~~~~~~^
      |                   |
      |                   long long int