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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<ll,ll> P;
struct edge{ll to, cost;};
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define INF 1000000000000
#define ALL(a)  (a).begin(),(a).end()
#define large 1000000000000000000
#define mod 1000000007

int modPow(long long a, long long n, long long p) {
  if (n == 0) return 1; // 0乗にも対応する場合
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
  long long t = modPow(a, n / 2, p);
  return (t * t) % p;
}

int main(){
    ll n,a,b;
    cin >> n >> a >> b;
    if(n == 2 && a == 1 && b == 2){
        cout << 0 << endl;
        return 0
    }
    ll zentai = 2;
    ll ans = 0;
    zentai = modPow(2,n,mod);
    ll x = 1,y=1;
    for(int i = 0; i < a;i++){
        x *= (n-i) % mod;
        x = x % mod;
    }
    for(int i = 1; i <= a;i++){
        y *= i % mod ;
        y = y % mod;
    }
    ll huga = modPow(y,mod-2,mod);
    ll ans1 = x * huga % mod;
    x = 1,y=1;
    for(int i = 0; i < b;i++){
        x *= (n-i) % mod;
        x = x % mod;
    }
    for(int i = 1; i <= b;i++){
        y *= i % mod ;
        y = y % mod;
    }
    ll hoge = modPow(y,mod-2,mod);
    ll ans2 = x * hoge % mod;


    ans = zentai - 1;
    ans += mod - huga;
    ans %= mod;
    ans += mod - hoge;
    ans %= mod;
    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: expected ';' before '}' token
   25 |         return 0
      |                 ^
      |                 ;
   26 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin>>N;
long long answer=1;
for(long long i=0;i<N;i++){
answer*=2;
answer%=1000000007;}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected '}' at end of input
    9 | answer%=1000000007;}
      |                     ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll INF = 1LL<<60;
//int INF = numeric_limits<int>::max();
const int MOD = 1000000007;
const int MAX = 1000000100;

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

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

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

int main(int, char**) {
	COMinit();
	int n, a, b;
	cin >> n >> a >> b;
	ll ret = modpow(2, n) - 1 - COM(n, a) - COM(n, b);
	if (ret < 0) ret += MOD;
	cout << ret << endl;
	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

const long long MOD = 1e9 + 7;

static long long calc_exp_mod (
    long long base,
    long long exponent)
{
    if ( exponent == 1 )
        return base;
    if ( n % 2 != 0 )
        return base * calc_exp_mod(base, exponent-1) % MOD;
    long long sqrt = cacl_exp_mod(base, exponent/2);
    return (sqrt * sqrt) % MOD;
}

static long long calc_combin_mod (
    long long n,
    long long k)
{
    long long x = 1;
    long long y = 1;

    for ( int i=0; i<r; i++ ) {
        x *= n - i;
        y *= i + 1;
        x %= MOD;
        y %= MOD;
    }
    y = calc_exp_mod(y, MOD-2);
    return (x * y) % MOD;
}

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

    long long ans = calc_exp_mod(2, n) - 1;
    ans += MOD - calc_combin_mod(n, a);
    ans %= MOD;
    ans += MOD - calc_combin_mod(n, b);
    ans %= MOD;

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



Compiler output:
a.cc: In function 'long long int calc_exp_mod(long long int, long long int)':
a.cc:13:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   13 |     if ( n % 2 != 0 )
      |          ^
      |          yn
a.cc:15:22: error: 'cacl_exp_mod' was not declared in this scope; did you mean 'calc_exp_mod'?
   15 |     long long sqrt = cacl_exp_mod(base, exponent/2);
      |                      ^~~~~~~~~~~~
      |                      calc_exp_mod
a.cc: In function 'long long int calc_combin_mod(long long int, long long int)':
a.cc:26:22: error: 'r' was not declared in this scope
   26 |     for ( int i=0; i<r; i++ ) {
      |                      ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define p_b push_back
#define pll pair < ll , ll >

using namespace std;

const ll M = 1000000007;

ll mult( ll a, ll b)
{
    return (a*b)%M;
}

ll bin_pow( ll a, ll n)
{
    ll ans = 1;
    while(n>0)
    {
        if(n&1) ans = mult(ans,a);
        a = mult(a,a);
        n/=2;
    }
    return ans%M;
}

ll solve( ll a, ll n)
{
    ll p = 1, q = 1;
    for( int i = 1; i <= a; i++)
    {
        p = mult(p,i);
    }
    for( int i = 0; i < a; i++)
    {
        q = mult(q,n-i);
    }
    return mult(q,bin_pow(p,M-2));
}


int main()
{
    ios_base :: sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n,a,b;
    cin >> n >> a >> b;
    ll ans = bin_pow(2,n)-1;
    ans = ans - solve(a,n)-solve(b,n);
    res%=M;
    if(ans<0)
    {
        ans+=M;
    }
    cout << ans;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:54:5: error: 'res' was not declared in this scope
   54 |     res%=M;
      |     ^~~
Language: C++

#include <bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"
#define PI 3.14159265358979
#define MOD 1000000007 // = 10^9 + 7

using namespace std;
using ll = long long;

// a^n % mod を計算する O(log n)
ll powmod(ll a, ll n, ll mod) {
	ll ret = 1;
	while (n > 0) {
		if (n % 2 == 1) { ret = ret * a % mod; }
		a = a * a % mod;
		n /= 2;
	}
	return ret;
}

// nCr % mod を計算する O(r)
ll combmod(ll n, ll r, ll mod)
{
	ll x = 1, y = 1;
	for(ll i = 0; i < r; ++i) { x = x * (n - i) % mod; }	// 分子
	for(ll i = 1; i <= r; ++i) { y = y * i % mod; }			// 分母
	return x * powmod(y, mod - 2, mod) % mod;	// nCr = (分子) * (分母)^-1 mod M
}

void solve()
{
	ll n, a , b;
	cin >> n >> a >> b;

	a = min(a, n - a);
	b = min(b, n - b);

	// 2^n - nCa ^- nCb
	cout << (powmod(2, n, MOD) - 1 - combination(n, a) + MOD - combination(n, b) + MOD) % MOD;
}

int main()
{
	fastio;
	solve();

	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:40:42: error: 'combination' was not declared in this scope
   40 |         cout << (powmod(2, n, MOD) - 1 - combination(n, a) + MOD - combination(n, b) + MOD) % MOD;
      |                                          ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
int64_t MOD=1000000007;
const 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;
}

int main() {
    // 前処理
    COMinit();
  int N,A,B;
    cin>>N>>A>>B;
  long long answer=0;
  for(int i=1;i<=N;i++){
    if(i==A||i==B)continue;
    answer+=COM(N,i);
    answer%=MOD;
  }
  cout<<answert;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'answert' was not declared in this scope; did you mean 'answer'?
   38 |   cout<<answert;
      |         ^~~~~~~
      |         answer
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>;


ll nck(ll n, ll k){
    
    ll p=1000000007;
    ll p2;
    p2=p-2;
    vector <int> r(35);
    vector <ll> r2(36);

    rep(j,35){
        r[j]=(p2>>j)&1;
    }

    ll ans;
    ans=1;

    if (k!=0){
    rep(i,k-1){   
        r2[0]=i+2;
        rep(j,35){
           
            r2[j+1]=(r2[j]*r2[j])%p;
            if(r[j]==1){
            ans*=r2[j];
            ans=ans%p;
            }
        }
    }
    rep(i,k){
        ans*=n-i;
        ans=ans%p;
    }
    }
    return ans;
}


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

    ll ans2,k2;
    vector <ll> si(35),amari(35);
    k2=2;

    rep(i,35){
        si[i]=((n>>i)&1);
        amari[i]=k2;
        k2=(k2*k2)%1000000007;
    }

    ans2=1;
    rep(i,35){
        if(si[i]==1){
        ans2*=si[i]*amari[i];
        ans2=ans2%(1000000007);
        }
    }

    ans-=nck(n,a)+nck(n,b)+1;
    if(ans2<0){
        ans2+=1000000007;
    }


    if(n<=2){
        ans2=0;
    }
    cout << ans2 << endl;



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:5: error: 'ans' was not declared in this scope; did you mean 'ans2'?
   66 |     ans-=nck(n,a)+nck(n,b)+1;
      |     ^~~
      |     ans2
Language: C++

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


 ll n=0;
 int a =0;
 int b =0;

ll choose(ll x)
{
     ll sum=1;
     int y = 1;
     rep(j,x)
     {
        sum *=(n-i);
       
        y *= (j+1);
     }
  return sum/y;
}


int main()
{
     cin>>n>>a>>b;
     ll cnt =0;
  
     for(ll i=1;i<n;i++)
     {
        if(i==a||i==b) continue;
     
        cnt += choose(i);
 
     }

  cout<<cnt<<endl;
  
  return 0;

}


Compiler output:
a.cc: In function 'll choose(ll)':
a.cc:17:18: error: 'i' was not declared in this scope
   17 |         sum *=(n-i);
      |                  ^
Language: C++

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


 ll n=0;
 int a =0;
 int b =0;

ll choose(ll x)
{
     ll sum=1;
     int y = 1;
     rep(j,x)
     {
        sum *=(n-i);
       
        y *= (j+1);
     }
  return sum/y;
}


int main()
{
     cin>>n>>a>>b;
     ll cnt =0;
  
     for(ll i=1;i<n;i++)
     {
        if(i==a||i==b) continue;
     
        cnt += choose(i);
 
     }

  cout<<cnt<<endl;
  
  return 0;

}


Compiler output:
a.cc:4:2: error: invalid preprocessing directive #fefine; did you mean #define?
    4 | #fefine rep(i,n)for(ll i=0;i<(n);i++)
      |  ^~~~~~
      |  define
a.cc: In function 'll choose(ll)':
a.cc:15:10: error: 'j' was not declared in this scope
   15 |      rep(j,x)
      |          ^
a.cc:15:6: error: 'rep' was not declared in this scope
   15 |      rep(j,x)
      |      ^~~
Language: C++

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

 ll n=0;
 ll a =0;
 ll b =0;

ll choose(int x)
{
     int sum=1;
     int y = 1;
     rep(i,x)
     {
        sum *=(n-i);
       
        y *= (i+1);
     }
  return sum/y;
}


int main()
{
     cin>>n>>a>>b;
     int cnt =0;
  
     for(int i=1;i<n;i++)
     {
        if(i==a||i==b) continue;
     
        cnt += choose(i);
 
     }

  cout<<cnt<<endl;
  
  return 0;

}

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #fefine; did you mean #define?
    3 | #fefine rep(i,n)for(int i=0;i<(n);i++)
      |  ^~~~~~
      |  define
a.cc: In function 'll choose(int)':
a.cc:14:10: error: 'i' was not declared in this scope
   14 |      rep(i,x)
      |          ^
a.cc:14:6: error: 'rep' was not declared in this scope
   14 |      rep(i,x)
      |      ^~~
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

ll RepSq(ll a,ll n,ll mod){
  if(n==0){
    return 1;
  }else if(n%2!=0){
    return (a*RepSq(a,n-1,mod))%mod;
  }else{
    ll x=RepSq(a,n/2,mod);
    return (x*x)%mod;
  }
}

int main(){
  ll n,a,b;
  cin>>n>>a>>b;
  ll mod=1000000007;
  ll comb[n+1];
  comb[0]=1; inv[1]=1;
  for(int i=1;i<300000+1;i++){
    inv[i]=mod-inv[mod%i]*(mod/i)%mod;
    comb[i]=(comb[i-1]*(n+1-i))%mod;
    comb[i]=(comb[i]*inv[i])%mod;
  }
  cout<<(3*mod+RepSq(2,n,mod)-1-comb[a]-comb[b])%mod;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: 'inv' was not declared in this scope; did you mean 'int'?
   37 |   comb[0]=1; inv[1]=1;
      |              ^~~
      |              int
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    ll n, a, b;
    cin >> n >> a >> b;
    ll sum = mod_pow(2, n, MOD) - 1;
    ll x_a = 1, y_a = 1, x_b = 1, y_b = 1;
    for(int i = 0; i < a; i++){
        x_a = x_a * (n - i) % MOD;
        y_a = y_a * (i + 1) % MOD;
    }
    for(int i = 0; i < b; i++){
        x_b = x_b * (n - i) % MOD;
        y_b = y_b * (i + 1) % MOD;
    }
    sum = sum - x_a * mod_inv(y_a, MOD) % MOD - x_b * mod_inv(y_b, MOD) % MOD + 2 * MOD;
    sum %= MOD;
    cout << sum;
}

Compiler output:
/usr/bin/ld: /tmp/ccgA2ofd.o: in function `main':
a.cc:(.text+0x55): undefined reference to `mod_pow(long long, long long, long long)'
/usr/bin/ld: a.cc:(.text+0x208): undefined reference to `mod_inv(long long, long long)'
/usr/bin/ld: a.cc:(.text+0x25a): undefined reference to `mod_inv(long long, long long)'
collect2: error: ld returned 1 exit status
Language: C++

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

#define ll long long

// 繰り返しに情報によって，累乗a^b (mod m)を計算する
ll mpow(ll a, ll b, ll m) {
  if (b == 1) return a;
  // b奇数のとき
  if (b % 2) return (a * mpow(a, (b-1), m)) %m;
  // b偶数のとき
  ll t = mpow(a, b/2, m) ;
  return (t * t) % m;
}


int main() {
  ll n, a, b;
  cin >> n >> a >> b;
  const ll M = 100000007;
  //全体 2^n
  
  ll ans = mpow(2, n, M) -1;
  
  
  // a,b本からなる花の数を引く(nCa, nCbを引く)
  int x = 1;
  if (a >= 1 && a <= n-1) { 
    for (ll i = n; i >= n-a+1; i--) {
      x *= i % M;
    } 
    
    for (ll i = 1; i <= a; i++) {
      x = x * mpow(i, M-2, M) %M;
  }
    
  ans -= x % M;
  
  x = 1;
  if (b >= 1 && b <= n-1) { 
    for (ll i = n; i >= n-b+1; i--) {
      x *= i % M;
    } 
    
    for (ll i = 1; i <= b; i++) {
      x = x * (mpow(i, M-2, M)) %M;
    }
  }
  ans -= x % M;
  
  if (ans < 0) {
    cout << (ans + 2 * M) % M << endl;
  } else {
    cout << ans << endl;
  }
}

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

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

#define ll long long

// 繰り返しに情報によって，累乗a^b (mod m)を計算する
ll mpow(ll a, ll b, ll m) {
  if (b == 1) return a;
  // b奇数のとき
  if (b % 2) return (a * mpow(a, (b-1), m)) %m;
  // b偶数のとき
  ll t = mpow(a, b/2, m) ;
  return (t * t) % m;
}


int main() {
  ll n, a, b;
  cin >> n >> a >> b;
  const ll M = 100000007;
  //全体 2^n
  
  ll ans = mpow(2, n, M) -1;
  
  
  // a,b本からなる花の数を引く(nCa, nCbを引く)
  int x = 1;
  int y = 1;
  if (a >= 1 && a <= n-1) { 
    for (ll i = n; i >= n-a+1; i--) {
      x *= i % M;
    } 
    
    for (ll i = 1; i <= a; i++) {
      y *= i % M;
    }
    y = mpow(y, M-2, M);
  }
  ans -= (x*y % M);
  
  x = 1;
  y = 1;
  if (b >= 1 && b <= n-1) { 
    for (ll i = n; i >= n-b+1; i--) {
      x *= i % M;
    } 
    
    for (ll i = 1; i <= b; i++) {
      y *= i % M;
    }
    y = mpow(y, M-2, M);
  }
  ans -= (x*y % M);
  
  if (ans < 0) {
    cout << (ans + 2 * M) % M; << endl;
  } else {
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:32: error: expected primary-expression before '<<' token
   56 |     cout << (ans + 2 * M) % M; << endl;
      |                                ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define INF (int)1e9+7
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vector<int>>
#define vvl vector<vector<long long>>
#define pii pair<int,int>
#define pll pair<long,long>
#define vpii vector<pii>
#define vpll vector<pll>
//#define N 100005
#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795


ll powM(ll a,ll b,ll m )
{ 
  a%=m;
  ll ans=1;
  while(b>0)
  {
    if(b&1)ans=ans*a%m;
    a=a*a%m;
    b>>=1;
  }

return ans;
}

ll N=2e5+1;

vl fac(N),invf(N);

c(ll n,ll r,ll m)
{
  return (fac[n]*invf[n-r]%m)*invf[r]%m;
}



int main()
{
   ios_base::sync_with_stdio(false);
    cin.tie(NULL);

ll n,a,b;
cin>>n>>a>>b;
ll m=(ll)1e9+7;

invf[0]=1;
fac[0]=1;
  for(int i=1;i<=N;i++)
  {
    fac[i]=fac[i-1]*i%m;
    invf[i]=powM(fac[i],m-2,m);
  }

  ll ans=powM(2,n,m)-c(n,a,m)-c(n,b,m)-1;

  ans=(ans+3*m)%m;

  cout<<ans<<"\n";

}

Compiler output:
a.cc:42:1: error: ISO C++ forbids declaration of 'c' with no type [-fpermissive]
   42 | c(ll n,ll r,ll m)
      | ^
Language: C++

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


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

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

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

    return x*y%MOD;
}

int main(){
    ll n,a,b; cin >> n >> a >> b;
    ll ans = modpow(2,n)-1;
    ans%=MOD;
    ans -= (COM(n,a)+COM(n,b))%MOD;
    ans%=MOD;
    if(ans<0) ams+=MOD;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:15: error: 'ams' was not declared in this scope; did you mean 'ans'?
   39 |     if(ans<0) ams+=MOD;
      |               ^~~
      |               ans
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1,z)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return (pow(x,y/2,z)*(pow(x,y/2,z))%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = (per(n,a,mod)*pow(per(a,a,mod),mod-2,mod))%mod;
        long B = (per(n,b,mod)*pow(per(b,b,mod),mod-2,mod))%mod;
        ans=(ans-A-B)%mod;
		System.out.println(ans);
	}
}


Compiler output:
Main.java:18: error: ')' expected
        return (pow(x,y/2,z)*(pow(x,y/2,z))%z;
                                             ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1,z)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return Math.pow(pow(x,y/2,z),2)%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = (per(n,a,mod)*pow(per(a,a,mod),mod-2,mod))%mod;
        long B = (per(n,b,mod)*pow(per(b,b,mod),mod-2,mod))%mod;
        ans=(ans-A-B)%mod;
		System.out.println(ans);
	}
}


Compiler output:
Main.java:18: error: incompatible types: possible lossy conversion from double to long
        return Math.pow(pow(x,y/2,z),2)%z;
                                       ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return Math.pow(pow(x,y/2,z),2)%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = (per(n,a,mod)*pow(per(a,a,mod),mod-2,mod))%mod;
        long B = (per(n.b,mod)*pow(per(b,b,mod),mod-2,mod))%mod;
        ans=(ans-A-B)%mod;
		System.out.println(ans);
	}
}


Compiler output:
Main.java:13: error: method per in class Main cannot be applied to given types;
        return (per(x,y-1)*(x-y+1))%z;
                ^
  required: long,long,long
  found:    long,long
  reason: actual and formal argument lists differ in length
Main.java:18: error: incompatible types: possible lossy conversion from double to long
        return Math.pow(pow(x,y/2,z),2)%z;
                                       ^
Main.java:34: error: long cannot be dereferenced
        long B = (per(n.b,mod)*pow(per(b,b,mod),mod-2,mod))%mod;
                       ^
3 errors
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return Math.pow(pow(x,y/2,z),2)%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod)%mod;
        long B = per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod)%mod;
        ans=(ans-A-B)%mod;
		System.out.println(ans);
	}
}


Compiler output:
Main.java:33: error: ')' expected
        long A = per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod)%mod;
                                                              ^
Main.java:34: error: ')' expected
        long B = per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod)%mod;
                                                              ^
2 errors
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return Math.pow(pow(x,y/2,z),2)%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = (per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod))%mod;
        long B = (per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod))%mod;
        ans = (ans-A-B)%mod;
		System.out.println(ans);
	}
}

Compiler output:
Main.java:33: error: ')' expected
        long A = (per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod))%mod;
                                                                ^
Main.java:34: error: ')' expected
        long B = (per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod))%mod;
                                                                ^
2 errors
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }    
    public static long per(long x,long y,long z){
        if(y==0) return 1;
        return (per(x,y-1)*(x-y+1))%z;
    }   
    public static long pow(long x,long y,long z){
        if(y==0) return 1;
        if(y%2==1) return (pow(x,y-1,z)*x)%z;
        return Math.pow(pow(x,y/2,z),2)%z;
    }
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long [] [] pascal = new long [51][51];
        for(int i=0;i<=50;i++){
        for(int j=0;j<=i;j++){if(j==0 || j==i){pascal[i][j]=1;}
                              else{pascal[i][j]=pascal[i-1][j-1]+pascal[i-1][j];}
                             }
        }
        long n = sc.nextLong();
        long a = sc.nextLong();
        long b = sc.nextLong();
		long mod = 1000000007;
        long ans = pow(2,n,mod)-1;
        long A = (per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod))%mod;
        long B = (per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod))%mod;
        ans=(ans-A-B)%mod;
		System.out.println(ans);
	}
}

Compiler output:
Main.java:33: error: ')' expected
        long A = (per(n,a,mod)*(pow(per(a,a,mod),mod-2,mod))%mod;
                                                                ^
Main.java:34: error: ')' expected
        long B = (per(n.b,mod)*(pow(per(b,b,mod),mod-2,mod))%mod;
                                                                ^
2 errors
Language: C++

#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long int ll;

const ll mod=1e9+7;

ll modPow(ll a, ll n) {
  if(n==1)return a%mod;
  if (n%2==1)return(a*modPow(a,n-1))%mod;
  ll t=modPow(a,n/2);
  return (t*t)%mod;
}

ll modDiv(int a,int b){
  return (a%mod)*modPow(b,mod-2)%mod;
}

ll comb(ll n,ll r){
  ll res=1;
  for(ll i=n;i>=n-r+1;--i){
    res*=i;
    res%=mod;
  }
  for(ll i=r;i>=1;--i)res=modDiv(res,i);
  return res%mod;
}

ll n,a,b;

int main(){
  cout<<modDiv()
  cin>>n>>a>>b;
  ll ans=modPow(2,n)-1;
  ans-=comb(n,a)+comb(n,b);
  ans=(ans+mod)%mod;
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:15: error: too few arguments to function 'll modDiv(int, int)'
   51 |   cout<<modDiv()
      |         ~~~~~~^~
a.cc:34:4: note: declared here
   34 | ll modDiv(int a,int b){
      |    ^~~~~~
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
using ll = long long;

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
const int mod = 998244353;
struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; }
	mint operator+(const mint a) const { return mint(*this) += a; }
	mint operator-(const mint a) const { return mint(*this) -= a; }
	mint operator*(const mint a) const { return mint(*this) *= a; }
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const { return pow(mod - 2); }
	mint& operator/=(const mint a) { return *this *= a.inv(); }
	mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream& operator>>(istream & is, const mint & a) { return is >> a.x; }
ostream& operator<<(ostream & os, const mint & a) { return os << a.x; }

mint ch(int n, int a) {
	mint x = 1, y = 1;
	rep(i, n) {
		x *= a - i;
		y *= i + 1;
	}
}

int main() {
	int n, a, b;
	mint sum=0;
	cin >> n >> a >> b;
	mint l = mint(2).pow(n);
	sum -= 1;
	sum -= ch(n, a);
	sum -= ch(n, b);
	cout << sum << endl;
	return 0;
}


Compiler output:
a.cc:14:11: error: redefinition of 'const int mod'
   14 | const int mod = 998244353;
      |           ^~~
a.cc:13:11: note: 'const int mod' previously defined here
   13 | const int mod = 1000000007;
      |           ^~~
a.cc: In function 'mint ch(int, int)':
a.cc:53:1: warning: no return statement in function returning non-void [-Wreturn-type]
   53 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
static const int mod=1000000007;
int64_t f(int64_t x,int64_t y){
if(y==0)
  return 1;
  else{
  if(y%2==0){
  return (f(x,y/2)*f(x,y/2))%mod;
  }else{
  return (((y*f(x,y/2))%mod)*f(x,y/2))%mod;
  }
  }

}
int64_t comb(int64_t n,int64_t k){
int64_t N=1; 
  for(int i=n-k+1;i<=n;i++)
    N=(N*i)%mod;
  int64_t K=1;
  for(int i=1;i<=k;i++)
    K=(K*i)%mod;
  return (N*f(K,mod-2))%mod
}
int main(){
int64_t N,a,b;
  cin>>N>>a>>b;
  int64_t ans=(f(2,N)-1-comb(N,a)-comb(N,b)+2*mod)%mod;
  cout<<ans<<endl;
  
   return 0;
}

Compiler output:
a.cc: In function 'int64_t comb(int64_t, int64_t)':
a.cc:23:28: error: expected ';' before '}' token
   23 |   return (N*f(K,mod-2))%mod
      |                            ^
      |                            ;
   24 | }
      | ~
Language: C++

#include <iostream>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <set>
#include <map>
#include <iterator>
#include <stack>
#include <string.h>
#include <cstdlib>
#include <queue>
#include <list>
#include <string>

using namespace std;
const long long N = 1000000001;
const long long MOD = 1000000007;

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

long long fac[N],finv[N],inv[N];

void cominit()
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (long long i = 2;i < N;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 || n < 0 || k < 0){
        return 0;
    }
    else {
        return fac[n]*(finv[k]*finv[n-k]%MOD)%MOD;
    }
}

int main()
{
    long long n;
    long long a,b;
    
    cin >> n >> a  >> b;
    
    long long ans = modpow(2,n,MOD) - com(n,a) - com(n,b) - 1;
    
    cout << ans << endl;
}


Compiler output:
/tmp/ccKj58Ux.o: in function `cominit()':
a.cc:(.text+0x7c): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x8e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x95): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x12c): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x18c): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x1a7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x20b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
/tmp/ccKj58Ux.o: in function `com(long long, long long)':
a.cc:(.text+0x27e): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKj58Ux.o
a.cc:(.text+0x299): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <numeric>
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000000001;
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();
long long counter;
counter=1;
long long counter1;
counter1=1;
int N,a,b;
cin>>N>>a>>b;
for(long long i=1;i<N;i++){
counter1+=(COM(N,i))%(1000000007);
counter1=counter1%(1000000007);
}
counter1-=(COM(N,a))%(1000000007)-(COM(N,b))%(1000000007);
counter1=counter1%(1000000007);
cout<<counter1<<endl;}


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

#include<iostream>
#include<math.h>
#define ll long long
ll mod=pow(10,9)+7;
ll pad(ll a ,ll b)
{
    ll k=1;
    a%=mod;
    while(b!=0){
        if(b%2==0){
            k=(k*a)%mod;
        }
        a=(a*a)%mod;
        b/=2;
    }
    return k;
}
ll ra(ll x){
return pad(x,mod-2);}
ll ncr(ll n,ll r){
ll m=max(n-r,r);
ll s=1,p=1;
for(ll i=m+1;i<=n;i++)
{
    s=(s*i)%mod;
}
m=min(n-r,r);
for(ll i=1;i<=m;i++)
{
    p*=ra(i);
    p%=mod;
}
return s*p;
}
void main()
{
 ll n,a,b;
 scanf("%lld %lld %lld",&n,&a,&b);
 ll x=pad(2,n)-1;
 ll y=ncr(n,a) ;
 ll z=ncr(n,b);
 ll c=(x-((y+z)%mod))%mod;
 if(c<0) c=c+mod;
 printf("%lld\n",c);
 return 0;
}

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

#include<iostream>
#include<math.h>
#define ll long long
ll mod=pow(10,9)+7;
ll pad(ll a ,ll b)
{
    ll k=1;
    a%=mod;
    while(b!=0){
        if(b%2==0){
            k=(k*a)%mod;
        }
        a=(a*a)%mod;
        b/=2;
    }
    return k;
}
ll ra(ll x){
return pad(x,mod-2);}
ll ncr(ll n,ll r){
ll m=max(n-r,r);
ll s=1,p=1;
for(ll i=m+1;i<=n;i++)
{
    s=(s*i)%mod;
}
m=min(n-r,r);
for(ll i=1;i<=m;i++)
{
    p*=ra(i);
    p%=mod;
}
return s*p;
}
void main()
{
 ll n,a,b;
 scanf("%lld %lld %lld",&n,&a,&b);
 ll x=pad(2,n)-1;
 ll y=ncr(n,a) ;
 ll z=ncr(n,b);
 ll c=(x-((y+z)%mod))%mod;
 if(c<0) c=c+mod;
 printf("%lld\n",c);
 return 0;
}

Compiler output:
a.cc: In function 'long long int ncr(long long int, long long int)':
a.cc:21:6: error: 'max' was not declared in this scope; did you mean 'std::max'?
   21 | ll m=max(n-r,r);
      |      ^~~
      |      std::max
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:27:3: error: 'min' was not declared in this scope; did you mean 'std::min'?
   27 | m=min(n-r,r);
      |   ^~~
      |   std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc: At global scope:
a.cc:35:1: error: '::main' must return 'int'
   35 | void main()
      | ^~~~
Language: C++

#include <iostream>
#include <set>
#include <vector>
#include <iomanip>
#include <deque>

#include <algorithm>

#include <cfenv>
#include <cmath>
typedef long long int ll;

using namespace std;
#include <string>


ll pow_repeat_mod(ll N, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = pow_mod_repeat(N, P/2, M);
        return t*t % M;
    }
    return N * pow_mod_repeat(N, P-1, M);
}


ll pow_repeat(ll N, ll P){
    if(P==0) return 1;
    if(P%2==0){
        ll t = pow_mod(N, P);
        return t*t;
    }
    return N * pow_mod(N, P-1);
}


int main()
{


    ll n, a, b;


    cin >> n >> a >> b;





    ll kasu = pow_repeat_mod(2,n,1000000007) -1;




    ll X_a =1;
    ll Y_a =1;

    ll X_b =1;
    ll Y_b =1;


    for(int i=0;i<a; i++){
        X_a = (X_a*((n-i)%1000000007))%1000000007;
    }

    for(int i=0;i<a; i++){
        Y_a = (Y_a*((i+1)%1000000007))%1000000007;
    }


    for(int i=0;i<b; i++){
        X_b = (X_b*((n-i)%1000000007))%1000000007;
    }

    for(int i=0;i<b; i++){
        Y_b = (Y_b*((i+1)%1000000007))%1000000007;
    }


    Y_a = pow_repeat_mod(Y_a,1000000007-2,1000000007);
    Y_b = pow_repeat_mod(Y_b,1000000007-2,1000000007);


    kasu = (kasu  - (X_a*Y_a)%1000000007 - (X_b*Y_b)%1000000007)%1000000007;


    cout << kasu << endl;


    
    

    return 0;
}



//繰り返し2乗法による




Compiler output:
a.cc: In function 'll pow_repeat_mod(ll, ll, ll)':
a.cc:20:16: error: 'pow_mod_repeat' was not declared in this scope
   20 |         ll t = pow_mod_repeat(N, P/2, M);
      |                ^~~~~~~~~~~~~~
a.cc:23:16: error: 'pow_mod_repeat' was not declared in this scope
   23 |     return N * pow_mod_repeat(N, P-1, M);
      |                ^~~~~~~~~~~~~~
a.cc: In function 'll pow_repeat(ll, ll)':
a.cc:30:16: error: 'pow_mod' was not declared in this scope
   30 |         ll t = pow_mod(N, P);
      |                ^~~~~~~
a.cc:33:16: error: 'pow_mod' was not declared in this scope
   33 |     return N * pow_mod(N, P-1);
      |                ^~~~~~~
Language: C++

#include <iostream>
#include <set>
#include <vector>
#include <iomanip>
#include <deque>

#include <algorithm>

#include <cfenv>
#include <cmath>
typedef long long int ll;

using namespace std;
#include <string>


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


ll pow_repeat(ll N, ll P){
    if(P==0) return 1;
    if(P%2==0){
        ll t = pow_mod(N, P);
        return t*t;
    }
    return N * pow_mod(N, P-1);
}


int main()
{


    ll n, a, b;


    cin >> n >> a >> b;





    ll kasu = pow_repeat_mod(2,n,1000000007) -1;




    ll X_a =1;
    ll Y_a =1;

    ll X_b =1;
    ll Y_b =1;


    for(int i=0;i<a; i++){
        X_a = (X_a*((n-i)%1000000007))%1000000007;
    }

    for(int i=0;i<a; i++){
        Y_a = (Y_a*((i+1)%1000000007))%1000000007;
    }


    for(int i=0;i<b; i++){
        X_b = (X_b*((n-i)%1000000007))%1000000007;
    }

    for(int i=0;i<b; i++){
        Y_b = (Y_b*((i+1)%1000000007))%1000000007;
    }


    Y_a = pow_repeat_mod(Y_a,1000000007-2,1000000007);
    Y_b = pow_repeat_mod(Y_b,1000000007-2,1000000007);


    kasu = (kasu  - (X_a*Y_a)%1000000007 - (X_b*Y_b)%1000000007)%1000000007;


    cout << kasu << endl;


    
    

    return 0;
}



//繰り返し2乗法による




Compiler output:
a.cc: In function 'll pow_repeat(ll, ll)':
a.cc:30:16: error: 'pow_mod' was not declared in this scope
   30 |         ll t = pow_mod(N, P);
      |                ^~~~~~~
a.cc:33:16: error: 'pow_mod' was not declared in this scope
   33 |     return N * pow_mod(N, P-1);
      |                ^~~~~~~
a.cc: In function 'int main()':
a.cc:50:15: error: 'pow_repeat_mod' was not declared in this scope; did you mean 'pow_repeat'?
   50 |     ll kasu = pow_repeat_mod(2,n,1000000007) -1;
      |               ^~~~~~~~~~~~~~
      |               pow_repeat
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
 
vector<long long> fact_inv, inv, Com;
 
/*  init_nCk :二項係数のための前処理
    計算量:O(n)
*/

void init_nCk(int n, int SIZE) {
    fact_inv.resize(SIZE + 5);
    inv.resize(SIZE + 5);
    fact_inv[0] = fact_inv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < SIZE + 5; i++) {
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        fact_inv[i] = fact_inv[i - 1] * inv[i] % MOD;
    }
    Com.resize(SIZE + 5);
    Com[0] = 1;
  int n;
  cin>>n;
    for (int i = 1; i < SIZE + 5; i++) {
        Com[i] = Com[i - 1] * ((n - i + 1) * inv[i] % MOD) % MOD;
    }
}
 
/*  nCk :MODでの二項係数を求める(前処理 int_nCk が必要)
    計算量:O(1)
*/
long long nCk(int k) {
    assert(!(k < 0));
    return Com[k];
}
int main() {
    // 前処理
    init_nCk();
long long t=0;
    long long a,b;
  cin>>a>>b;
  for(long long i=0; i<=n; i++){
if(i!=a && i!=b) t+=nCk(i);
  }
    cout<<t%MOD<<endl;
}
  

Compiler output:
a.cc: In function 'void init_nCk(int, int)':
a.cc:22:7: error: declaration of 'int n' shadows a parameter
   22 |   int n;
      |       ^
a.cc:11:19: note: 'int n' previously declared here
   11 | void init_nCk(int n, int SIZE) {
      |               ~~~~^
a.cc: In function 'int main()':
a.cc:38:13: error: too few arguments to function 'void init_nCk(int, int)'
   38 |     init_nCk();
      |     ~~~~~~~~^~
a.cc:11:6: note: declared here
   11 | void init_nCk(int n, int SIZE) {
      |      ^~~~~~~~
a.cc:42:25: error: 'n' was not declared in this scope
   42 |   for(long long i=0; i<=n; i++){
      |                         ^