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

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;

vector<long long int> memo(1000000000);

long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long inv(long long g) {
    long long res = 1;
    for(int i = 0; i < mod - 2) { res = (res * x) % mod; }
    return res;
}
long long int C(long long int n1, long long int k1) {
    long long int a1 = 1;
    long long int b1 = 1;
    long long int c1 = 1;
    memo[0] = 1;
   for(long long int i = 1; i <= n1; i++) {
       memo[i] = (memo[i - 1] * i) % mod;
   }

   a1 = memo[n1];
   b1 = memo[n1- k1];
   c1 = memo[k1];
   long long bc = ( b1 * c1 ) % mod;
    long long an = (a1 * inv(bc) % mod;
    return an;
}

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

    long long int ans = pow(2, num) - 1 - C(num, a) - C(num, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'long long int inv(long long int)':
a.cc:19:31: error: expected ';' before ')' token
   19 |     for(int i = 0; i < mod - 2) { res = (res * x) % mod; }
      |                               ^
      |                               ;
a.cc:19:48: error: 'x' was not declared in this scope
   19 |     for(int i = 0; i < mod - 2) { res = (res * x) % mod; }
      |                                                ^
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:35:39: error: expected ')' before ';' token
   35 |     long long an = (a1 * inv(bc) % mod;
      |                    ~                  ^
      |                                       )
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;

vector<long long int> memo(num);

long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long int C(long long int n1, long long int k1) {
    long long int a1 = 1;
    long long int b1 = 1;
    long long int c1 = 1;
    memo[0] = 1;
   for(long long int i = 1; i <= n1; i++) {
       memo[i] = (memo[i - 1] * i) % mod;
   }

   a1 = memo[n1];
   b1 = memo[n1- k1];
   c1 = memo[k1];
    long long an = (a1 / (b1 * c1) % mod) % mod;
    return an;
}
int main() {
    long long int num;
    long long int a,b;
    cin >> num >> a >> b;

    long long int ans = pow(2, num) - 1 - C(num, a) - C(num, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc:5:28: error: 'num' was not declared in this scope; did you mean 'enum'?
    5 | vector<long long int> memo(num);
      |                            ^~~
      |                            enum
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long int N;
long long int memo[N];

long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long int C(long long int n1, long long int k1) {
    long long int a1 = 1;
    long long int b1 = 1;
    long long int c1 = 1;
    memo[0] = 1;
   for(long long int i = 1; i < N; i++) {
       memo[i] = (memo[i - 1] * i) % mod;
   }

   a1 = memo[n1];
   b1 = memo[n1- k1];
   c1 = memo[k1];
    long long an = (a1 / (b1 * c1) % mod) % mod;
    return an;
}
int main() {
    long long int  a,b;
    cin >> N >> a >> b;

    long long int ans = pow(2, N) - 1 - C(N, a) - C(N, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc:5:20: error: size of array 'memo' is not an integral constant-expression
    5 | long long int memo[N];
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long int memo[N];
long long int N;
long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long int C(long long int n1, long long int k1) {
    long long int a1 = 1;
    long long int b1 = 1;
    long long int c1 = 1;
    memo[0] = 1;
   for(long long int i = 1; i < N; i++) {
       memo[i] = (memo[i - 1] * i) % mod;
   }

   a1 = memo[n1];
   b1 = memo[n1- k1];
   c1 = memo[k1];
    long long int an = (a1 / (b1 * c1) % mod) % mod;
    return an;
}
int main() {
    long long int  a,b;
    cin >> N >> a >> b;

    long long int ans = pow(2, N) - 1 - C(N, a) - C(N, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc:4:20: error: 'N' was not declared in this scope
    4 | long long int memo[N];
      |                    ^
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:20:5: error: 'memo' was not declared in this scope
   20 |     memo[0] = 1;
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long memo[1000000007];
memo[0] = 1;
long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long int C(long long int n1, long long int k1) {
    long long a1 = 1;
    long long b1 = 1;
    long long c1 = 1;

   for(long long int i = 1; i <= mod; i++) {
       memo[i] = (memo[i - 1] * i) % mod;
   }

   a1 = memo[n1];
   b1 = memo[n1- k1];
   c1 = memo[k1];
    long long an = (a1 / (b1 * c1) % mod) mod;
    return an;
}
int main() {
    long long N,a,b;
    cin >> N >> a >> b;

    long long int ans = pow(2, N) - 1 - C(N, a) - C(N, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc:5:1: error: 'memo' does not name a type
    5 | memo[0] = 1;
      | ^~~~
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:28:43: error: expected ',' or ';' before 'mod'
   28 |     long long an = (a1 / (b1 * c1) % mod) mod;
      |                                           ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long pow(long long x, long long n) {
    long long ret = 1;
    while(n > 0) {
        if(n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }

    return ret;
}
long long int C(long long int n1, long long int k1) {
    long long a1 = 1;
    long long b1 = 1;
    long long c1 = 1;

    for(long long int i = 1; i <= n1; i++) {
        a1 = (a1 * i) % mod; 
    }

    for(long long int i = 1; i <= n1 - k; i++) {
        b1 = (b1 * i) % mod;
    }

    for(long long int i = 1; i <= k1; i++) {
        c1 = (c1 * i) % mod;
    }

    long long int an = (a1 / (b1 * c1) % mod) % mod;

    return an;
}
int main() {
    long long N,a,b;
    cin >> N >> a >> b;

    long long int ans = pow(2, N) - 1 - C(N, a) - C(N, b); 
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:23:40: error: 'k' was not declared in this scope
   23 |     for(long long int i = 1; i <= n1 - k; i++) {
      |                                        ^
Language: C++

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

const int mod = 1000000007;

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;}
  
  bool operator<(const mint a) const { return mint(*this).x < a.x;}
  bool operator>(const mint a) const { return mint(*this).x > a.x;}
  bool operator<=(const mint a) const { return mint(*this).x <= a.x;}
  bool operator>=(const mint a) const { return mint(*this).x >= a.x;}
  bool operator==(const mint a) const { return mint(*this).x == a.x;}

  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 combi(int n, int r){
    mint upper = n;
    mint bottom = r;
    for(int i=1;i<r;i+=1){
        upper *= n-i;
        bottom *= r-i;
    }
    return upper / bottom;
}


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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
int kai(int x){
  int j=1;
  while(x>=1){
    j = j*x;
    x--;
  }
  return j;
    
}

int main(){
 int64_t N,a,b;
 cin >> N>>a>>b;
 int64_t s;
 for (int i=1;i<N;i++){
   if( i==a){
     continue;
   }
    if( i==b){
     continue;
   }
   
   s = s+kai(N)/kai(i)/kai(N-i);
 }
  if(N !=a && N!=b){
     cout<<(s+1)%(100000007)<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:30:4: error: expected '}' at end of input
   30 |   }
      |    ^
a.cc:14:11: note: to match this '{'
   14 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;

const long long int INF = 1 << 17;
const long long int MAX = 1000000007;
const long long int MOD = 1000000007;


long long int multi1(long long int n,long long int a){
  long long int res = 1;
  for(long long int i=n;i>=n-a+1;i--){
    res *= i;
    res %= MOD;
  }
  
  return res;
}

long long int multi2(long long int n){
  long long int res = 1;
  for(long long int i=1;i<=n;i++){
    res *= i;
    res %= MOD;
  }
  
  return res;
}

long long int RepeatSquaring(long long int N, long long int P, long long int M){
  long long int res = 1;
    while(P>0){
        if(P & 1) res = res * N % M;
        N = N * N % M;
        P >>= 1;
    }
    return res;
}
 




int main(){
  long long int n , a , b ;
  
  cin >> n >> a >> b;
  long long int ans = RepeatSquaring(2,n,MOD)-1
  long long int ma = multi2(min(a,n-a));
  long long int mb = multi2(min(b,n-b));
  long long int ans -= ((multi1(n,a)*RepeatSquaring(ma,MOD-2,MOD))%MOD);
  long long int ans -= ((multi1(n,b)*RepeatSquaring(mb,MOD-2,MOD))%MOD);
  
  cout << ans  << endl;
 
}

  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:51:3: error: expected ',' or ';' before 'long'
   51 |   long long int ma = multi2(min(a,n-a));
      |   ^~~~
a.cc:53:21: error: expected initializer before '-=' token
   53 |   long long int ans -= ((multi1(n,a)*RepeatSquaring(ma,MOD-2,MOD))%MOD);
      |                     ^~
a.cc:54:21: error: expected initializer before '-=' token
   54 |   long long int ans -= ((multi1(n,b)*RepeatSquaring(mb,MOD-2,MOD))%MOD);
      |                     ^~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;

const long long int INF = 1 << 17;
const long long int MAX = 1000000007;
const long long int MOD = 1000000007;


long long int multi1(long long int n,long long int a){
  long long int res = 1;
  for(long long int i=n;i>=n-a+1;i--){
    res *= i;
    res %= MOD;
  }
  
  return res;
}

long long int multi2(long long int n){
  long long int res = 1;
  for(long long int i=1;i<=n;i++){
    res *= i;
    res %= MOD;
  }
  
  return res;
}

long long int RepeatSquaring(long long int N, long long int P, long long int M){
  long long int res = 1;
    while(P>0){
        if(P & 1) res = res * N % M;
        N = N * N % M;
        P >>= 1;
    }
    return res;
}
 




int main(){
  long long int n , a , b ;
  
  cin >> n >> a >> b;
  long long int ans = RepeatSquaring(2,n,MOD)-1
  long long int ma = multi2(min(a,n-a));
  long long int mb = multi2(min(b,n-b));
  long long int ans -= (multi1(n,a)*RepeatSquaring(ma,MOD-2,MOD))%MOD;
  long long int ans -= (multi1(n,b)*RepeatSquaring(mb,MOD-2,MOD))%MOD;
  
  cout << ans  << endl;
 
}

  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:51:3: error: expected ',' or ';' before 'long'
   51 |   long long int ma = multi2(min(a,n-a));
      |   ^~~~
a.cc:53:21: error: expected initializer before '-=' token
   53 |   long long int ans -= (multi1(n,a)*RepeatSquaring(ma,MOD-2,MOD))%MOD;
      |                     ^~
a.cc:54:21: error: expected initializer before '-=' token
   54 |   long long int ans -= (multi1(n,b)*RepeatSquaring(mb,MOD-2,MOD))%MOD;
      |                     ^~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;
const int INF = 1 << 17;

long long int two(int n){
  long long int res = 1;
  for(int i=0;i<n;i++){
    res *= 2;
    res %= 1000000007;
  }
  
  return res;
}
long dp[max][max];

long long int nCr(int n, int r)
{
       if(n==r) return dp[n][r] = 1;
       if(r==0) return dp[n][r] = 1;
       if(r==1) return dp[n][r] = n;
       if(dp[n][r]) return dp[n][r];
       return dp[n][r] = nCr(n-1,r) + nCr(n-1,r-1);
}

int main(){
  int n , a ,b ;
  
  cin >> n >> a >> b;
  
  cout << two(n) - (nCr(n,a)+ nCr(n,b))%1000000007 << endl;
}

  
  

Compiler output:
a.cc:17:17: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int'
   17 | long dp[max][max];
      |                 ^
a.cc:17:6: error: size of array 'dp' has non-integral type '<unresolved overloaded function type>'
   17 | long dp[max][max];
      |      ^~
a.cc:17:17: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int'
   17 | long dp[max][max];
      |                 ^
a.cc:17:6: error: size of array 'dp' has non-integral type '<unresolved overloaded function type>'
   17 | long dp[max][max];
      |      ^~
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>
#include <set>
#include <map>
#include <list>

using ll = long long;
using ld = long double;
using namespace std;
const int INF = 1e9+100;
const ll INF64 = 7e18l;
const int mod = 1000000007;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(), (a).end()
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);



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

ll modinv(ll x){
    return modpow(x,mod-2);
}

ll comb(ll n, ll k){
    ll ans1 = 1;
    ll ans2 = 1;
    rep(i,k) ans1 = ans1 * (n-i) % mod;
    rep(i,k) ans2 = ans2 * (i+1) % mod;
    return ans1*modinv(ans2) % mod;
}

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


Compiler output:
a.cc:45:12: error: macro "rep" requires 3 arguments, but only 2 given
   45 |     rep(i,k) ans1 = ans1 * (n-i) % mod;
      |            ^
a.cc:22:9: note: macro "rep" defined here
   22 | #define rep(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc:46:12: error: macro "rep" requires 3 arguments, but only 2 given
   46 |     rep(i,k) ans2 = ans2 * (i+1) % mod;
      |            ^
a.cc:22:9: note: macro "rep" defined here
   22 | #define rep(i,a,b) for(int i=(a);i<(b);i++)
      |         ^~~
a.cc: In function 'll comb(ll, ll)':
a.cc:45:5: error: 'rep' was not declared in this scope
   45 |     rep(i,k) ans1 = ans1 * (n-i) % mod;
      |     ^~~
a.cc:46:8: error: expected ';' before 'ans2'
   46 |     rep(i,k) ans2 = ans2 * (i+1) % mod;
      |        ^     ~~~~
      |        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const LL p = 1e9 + 7;
LL n, a, b, ans;

LL qwe(LL a, LL n) { //快速幂
	LL res = 1LL;
	while(n) {
		if(n & 1) res = res * a % Mod;
		a = a * a % Mod;
		n >>= 1LL;
	}
	return res % p;
}

LL inv(LL x) { //逆元
	return qwe(x, p - 2) % p;
}

LL C(LL n, LL m) { //组合数
	LL res = 1LL;
	for(LL i = 1, j = n; i <= m; i++, j--) {
		res = res * j % p;
		res = res * inv(i) % p;
	}
	return res;
}

LL lucas(LL a, LL b) {
	if(a < p && b < p) return C(a, b);
	return C(a % p, b % p) * lucas(a / p, b / p) % p;
}

int main() {
	cin >> n >> a >> b;
	ans = ((qwe(2LL, n) - (lucas(n, a) % p + lucas(n, b) % p) % p - 1 + p) % p;
	cout << ans << endl;
    return 0;
}

/*
n和m较大, 且p为素数时
Lucas定理作用: c(n, m) mod p
C(n, m) % p = C(n / p, m / p) * C(n % p, m % p) % p
=> Lucas(n, m) % p = Lucas(n / p, m / p) * C(n % p, m % p) % p
*/

Compiler output:
a.cc: In function 'LL qwe(LL, LL)':
a.cc:10:43: error: 'Mod' was not declared in this scope
   10 |                 if(n & 1) res = res * a % Mod;
      |                                           ^~~
a.cc:11:29: error: 'Mod' was not declared in this scope
   11 |                 a = a * a % Mod;
      |                             ^~~
a.cc: In function 'int main()':
a.cc:37:83: error: expected ')' before ';' token
   37 |         ans = ((qwe(2LL, n) - (lucas(n, a) % p + lucas(n, b) % p) % p - 1 + p) % p;
      |               ~                                                                   ^
      |                                                                                   )
Language: C++

/*abc157D*/
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>

long long com(int x, int y);
int main(void) {
  int n, n2, a, b, i, max=1;
  long long spe=1, x[100], p=2, ax=1, bx=1;
  //spe:種類, x:2^(i^2),
  scanf(" %d %d %d", &n, &a, &b);
  x[0]=1, x[1]=2, n2=n;

  for(i=2; n >= p; i++){
    p*=2;
    x[i]=x[i - 1] * x[i - 1] % (1000000007);
    max=i;
    //printf("x[%d]=%lld n=%d\n", i, x[i], n);
  }

  for(i=max; i >= 0; i--){
    if(n2 >= pow(2, i - 1)){
      n2-=pow(2, i - 1);
      spe=spe * x[i] % (1000000007);
      //printf("n=%d x[%d]=%d spe=%lld\n", n, i, x[i], spe);
    }
  }
  spe-=com(n, a) + com(n, b) + 1;
  while(spe<=0)spe+=1000000007;
  printf("%lld", spe);

}
long long com(int x, int y) {
  int i;
  long long ret=1, tmp=1;

  for(i=0; i < y; i++){
    ret=ret * (x - i) % 1000000007;
    tmp=tmp * (i + 1) % 1000000007;
    //printf("x=%d y=%d       %lld/%lld\n", x, y, ret, tmp);
  }
  //printf("y=%d\n", y);
  while(ret % tmp != 0)
    ret+=1000000007;
  //printf("return:%lld/%lld=%lld\n", ret, tmp, (ret / tmp)% 1000000007);
  return (ret / tmp)% 1000000007;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: 'pow' was not declared in this scope
   23 |     if(n2 >= pow(2, i - 1)){
      |              ^~~
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}

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

ll modfact(ll n_a,ll n_z,ll mod){
    if(n_a==n_z) return n_z%mod;
    else return n_a*modfact(n_a-1,n_z,mod)%mod;
}

ll modcomb(ll n,ll m,ll mod){
    return modfact(n,n-m+1,mod)*modpow(modfact(m,1,mod),mod-2,mod)%mod;
}

int main(){
    ll n,a,b,ans;
    cin>>n>>a>>b;
    ans=modpow(2,n,1e9+7)-modcomb(n,a,1e9+7)-modcomb(n,b,1e9+7)-1;
    if(ans<0) ans+=1e9+7;
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'll modpow(ll, ll, ll)':
a.cc:11:53: error: expected ';' before ')' token
   11 |     else if(n%2==0) return modpow(a*a%mod,n/2,mod),2);
      |                                                     ^
      |                                                     ;
a.cc:11:53: error: expected primary-expression before ')' token
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else return a*modpow(a*a%mod,(n-1)/2,mod)%mod;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1000000007;
long long mod_pow(long long x, long long n, long long mod) {// O(log(n))
    long long res = 1;
    while (n > 0) {//繰り返し二乗法
        if (n & 1) res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}
//xの逆元を計算する
long long mod_inv(long long x, long long mod) {//O(log(mod))
    return mod_pow(x, mod - 2, mod);
}
long long find_numerator(long long n,long long a){
    long long p=1;
    for(long long i=0;i<=(a-1);i++){
        (p*=(n-i))%=MOD;
    }
    return p:
}
long long find_denominator(long long n, long long a){
    long long q=1;
    for(long long i=1;i<=a;i++){
        (q*=i) %=MOD;
    }
    return q;
}
int main() {
long long n,a,b;
cin >> n >> a >> b;
long long all=mod_pow(2,n,MOD) - 1;
long long c,d,e,f;
c=find_numerator(n,a);
d=find_denominator(n,a);
e=find_numerator(n,b);
f=find_denominator(n,b);
d=mod_inv(d,MOD);
f=mod_inv(f,MOD);
long long flowerofa=c*d;
long long flowerofb=e*f;
long long ans=all - flowerofa - flowerofb;
if(ans<0)ans+=MOD;
cout << ans << endl;

Compiler output:
a.cc: In function 'long long int find_numerator(long long int, long long int)':
a.cc:22:13: error: expected ';' before ':' token
   22 |     return p:
      |             ^
      |             ;
a.cc:22:13: error: expected primary-expression before ':' token
a.cc: In function 'int main()':
a.cc:46:21: error: expected '}' at end of input
   46 | cout << ans << endl;
      |                     ^
a.cc:31:12: note: to match this '{'
   31 | int main() {
      |            ^
Language: Java

import java.util.*;

public class Main {
	static int MOD = 1_000_000_007;
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();

        System.out.println(((modPow(2, n) - comb(n, a) - comb(n, b) - 1) + * MOD) % MOD);
    }

    private static long modPow(long a, long b) {
    	if(b == 0)
    		return 1;
    	if(a == 0)
    		return 0;
    	if(b == 1)
    		return a;
    	long res = modPow(a, b / 2) % MOD;
    	if(b % 2 == 1)
    		return ((res * res) % MOD) * a % MOD;
    	return (res * res) % MOD;
    }

    private static long factorial(long n, long start) {
    	long res = 1L;
    	for(long i = start; i <= n; i++)
    		res = (res % MOD)* (i % MOD) % MOD;
    	return res;
    }

    private static long comb(long a, long b) {
    	long factA = factorial(a, a - b + 1) % MOD;
    	long factB = factorial(b, 1) % MOD;
    	long inv = modPow(factB, MOD - 2) % MOD;
    	return factA * inv % MOD;
    }
}


Compiler output:
Main.java:11: error: illegal start of expression
        System.out.println(((modPow(2, n) - comb(n, a) - comb(n, b) - 1) + * MOD) % MOD);
                                                                           ^
1 error
Language: C++

#include <iostream>
#include <vector>
using namespace std;
long long mod=1e9+7;
struct nCk{
	long long pow(long long x,long long n){
		long long ret=1;
		if(n>0){
			ret=pow(x,n/2);
			if(n%2==0){
				(ret=(ret*ret))%=mod;
			}else{
				(ret=((ret*ret)%mod)*x)%=mod;
			}
		}
		return ret;
	}
	long long inv(long long n){
		return pow(n,mod-2);
	}
	long long nck(long long n,long long k){
		long long ret=1;
		for(int i=n;i>n-k;i--){
			(ret*=i)%=mod;
		}
		for(int i=k;i>=1;i--){
			(ret*=inv(i))%=mod;
		}
		return ret;
	}
};
int main(){
	long long n,a,b;
	cin>>n>>a>>b;
	nCk nii;
	long long ans=pow(2,n);
	(ans+=mod-1)%=mod;
	long long A=nii.nck(n,a);
	long long B=nii.nck(n,b);
	(ans+=mod-A)%=mod;
	(ans+=mod-B)%=mod;
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: 'pow' was not declared in this scope
   36 |         long long ans=pow(2,n);
      |                       ^~~
Language: C++

import operator as op
from functools import reduce

mod = 10e9 + 7
n, a, b = input().split()

def nCr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer / denom


ans = (2^n % mod - nCr(n, a) % mod - nCr(n, b) % mod) % mod

print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import operator as op
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

const ll mod=1e9+7;
ll fastpow(ll a, ll n)
{
    if(n == 0) return 1;
    ll x = p(a, n/2);
    ll ans = x * x % mod;
    if(n % 2 == 1) ans = ans *a % mod;
    return ans%mod;
}

ll C(ll n,ll m) {
    if(n < m) return 0;
    ll res = 1;
    for(ll i=1; i<=m; i++) {
        ll a = (n+i-m)%mod;
        ll b = i%mod;
        res = res*(a*p(b,mod-2)%mod)%mod;
    }
    return res;
}

ll Lucas(ll n,ll m) {
    if(m == 0) return 1;
    return C(n%mod, m%mod) * Lucas(n/mod,m/mod)%mod;
}

ll n,a,b;
int main(){
    cin>>n>>a>>b;
    ll ans=p(2,n)-Lucas(n,a)-Lucas(n,b)-1;
   while(ans<0) {
        ans+=mod;
    }
    cout<<ans%mod;
    return 0;
}


Compiler output:
a.cc: In function 'll fastpow(ll, ll)':
a.cc:9:12: error: 'p' was not declared in this scope
    9 |     ll x = p(a, n/2);
      |            ^
a.cc: In function 'll C(ll, ll)':
a.cc:21:22: error: 'p' was not declared in this scope
   21 |         res = res*(a*p(b,mod-2)%mod)%mod;
      |                      ^
a.cc: In function 'int main()':
a.cc:34:12: error: 'p' was not declared in this scope
   34 |     ll ans=p(2,n)-Lucas(n,a)-Lucas(n,b)-1;
      |            ^
Language: C++

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

int main() {
  int n,a,b ;
  cin >>n>>a>>b ;
    
  cout << (pow(2,n) -pow  (2,a)-pow(2,b) -1) % ( pow(10,9)+7) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:46: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
    8 |   cout << (pow(2,n) -pow  (2,a)-pow(2,b) -1) % ( pow(10,9)+7) << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
      |                                          |                |
      |                                          |                __gnu_cxx::__promote<double>::__type {aka double}
      |                                          __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main() {
  int n,a,b ;
  cin n>>a>>b ;
    
  cout << pow(2,n) -pow  (2,a)-pow(2,b) -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n>>a>>b ;
      |      ^~
      |      ;
Language: C++

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

int big = 1000000007;

int main() {
  int n, a, b;
  cin >> n >> a >> b;
  
  int x = 1;
  rep(i,n){
    x = x * 2 % big;
  }
  
  ll y = 1;
  rep(i,b){
    y = y * (n - i)  / (i + 1) % big;
    if(i == a) ll z = y;
  }
  
  cout << x - y - z << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'z' was not declared in this scope
   23 |   cout << x - y - z << endl;
      |                   ^
Language: C++

/*
±¾±¦µÄ³ÌÐòÍâÈË±ðÏë¿´£¡£¡

name: [ÏÄ±¦±¦]
run time£º[] ms
compilation time: [] ms
output memory: [] MiB
where: []
state: []
*/
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;

inline int read()
{
	int s=0, w=1;

	char ch=getchar();

	while(ch<'0' || ch>'9')
	{
		if(ch='-')
		{
			w=-w;
		}

		ch=getchar();
	}

	while(ch>='0' && ch<='9')
	{
		s=(((s*10ll))+(ch-'0'));

		ch=getchar();
	}

	return s;
}

long long int n, a, b;

int main()
{
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	
	cout.sync_with_stdio(false);
	ios::sync_with_stdio(0);
	cin.tie(0);
	long long int ksm(long long int x, long long int y);
	long long int xcj(long long int n, long long int m);
	
	n=read();
	a=read();
	b=read();
	
	cout<<(ksm(2, n)-1-xcj(n, a)-xcj(n, b)+mod+mod)%mod<<endl;
	
	return 0;
}

long long int ksm(long long int x, long long int y)
{
	long long int ans=1;
	
	for( ; y; y>>=1, x=x*x%mod)
	{
		if(y&1)
		{
			sum=sum*x%mod;
		}
	}
	
	return ans;
 } 
 
 long long int xcj(long long int n, long long int m)
{
	long long int a1=1, a2=1;
	
	for(long long int i=n; i>=n-m+1; i--)
	{
		a1=a1*i%mod;
	}
	
	for(long long int i=2; i<=m; i++)
	{
		a2=a2*i%mod;
	}
	
	return a1*ksm(a2, mod-2)%mod;
 }

Compiler output:
a.cc: In function 'long long int ksm(long long int, long long int)':
a.cc:71:25: error: 'sum' was not declared in this scope
   71 |                         sum=sum*x%mod;
      |                         ^~~
Language: C++

/*
±¾±¦µÄ³ÌÐòÍâÈË±ðÏë¿´£¡£¡

name: [ÏÄ±¦±¦]
run time£º[] ms
compilation time: [] ms
output memory: [] MiB
where: []
state: []
*/
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;

inline int read()
{
	int s=0, w=1;

	char ch=getchar();

	while(ch<'0' || ch>'9')
	{
		if(ch='-')
		{
			w=-w;
		}

		ch=getchar();
	}

	while(ch>='0' && ch<='9')
	{
		s=(((s*10ll))+(ch-'0'));

		ch=getchar();
	}

	return s;
}

long long int n, a, b;

int main()
{
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	
	cout.sync_with_stdio(false);
	ios::sync_with_stdio(0);
	cin.tie(0);
	long long int ksm(long long int x, long long int y);
	long long int xcj(long long int n, long long int m);
	
	n=read();
	a=read();
	b=read();
	
	cout<<(ksm(2, n)-1-xcj(n, a)-xcj(n, b)+mod+mod)%mod<<endl;
	
	return 0;
}

long long int ksm(long long int x, long long int y)
{
	long long int ans=1;
	
	for( ; y; y>>=1, x=x*x%mod)
	{
		if(d&1)
		{
			sum=sum*x%mod;
		}
	}
	
	return ans;
 } 
 
 long long int xcj(long long int n, long long int m)
{
	long long int a1=1, a2=1;
	
	for(long long int i=n; i>=n-m+1; i--)
	{
		a1=a1*i%mod;
	}
	
	for(long long int i=2; i<=m; i++)
	{
		a2=a2*i%mod;
	}
	
	return a1*ksm(a2, mod-2)%mod;
 }

Compiler output:
a.cc: In function 'long long int ksm(long long int, long long int)':
a.cc:69:20: error: 'd' was not declared in this scope
   69 |                 if(d&1)
      |                    ^
a.cc:71:25: error: 'sum' was not declared in this scope
   71 |                         sum=sum*x%mod;
      |                         ^~~
Language: C++

/*
±¾±¦µÄ³ÌÐòÍâÈË±ðÏë¿´£¡£¡

name: [ÏÄ±¦±¦]
run time£º[] ms
compilation time: [] ms
output memory: [] MiB
where: []
state: []
*/
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;

inline int read()
{
	int s=0, w=1;

	char ch=getchar();

	while(ch<'0' || ch>'9')
	{
		if(ch='-')
		{
			w=-w;
		}

		ch=getchar();
	}

	while(ch>='0' && ch<='9')
	{
		s=(((s*10ll))+(ch-'0'));

		ch=getchar();
	}

	return s;
}

long long int n, a, b;

int main()
{
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);
	
	cout.sync_with_stdio(false);
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	n=read();
	a=read();
	b=read();
	
	cout<<(ksm(2, n)-1-xcj(n, a)-xcj(n, b)+mod+mod)%mod<<endl;
	
	return 0;
}

int ksm(long long int x, long long int y)
{
	long long int ans=1;
	
	while(y)
	{
		if(x&1)
		{
			ans=ans*x%mod;
		}
		
		x=x*x%mod;
		
		y>>=1;
	}
	
	return ans;
 } 
 
 long long int(long long int n, long long int m)
{
	long long int a1=1, a2=1;
	
	for(int i=n; i>=n-m+1; i--)
	{
		a1=a1*i%mod;
	}
	
	for(int i=2; i<=m; i++)
	{
		a2=a2*i%mod;
	}
	
	return a1*ksm(a2, mod-2);
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:56:16: error: 'ksm' was not declared in this scope
   56 |         cout<<(ksm(2, n)-1-xcj(n, a)-xcj(n, b)+mod+mod)%mod<<endl;
      |                ^~~
a.cc:56:28: error: 'xcj' was not declared in this scope
   56 |         cout<<(ksm(2, n)-1-xcj(n, a)-xcj(n, b)+mod+mod)%mod<<endl;
      |                            ^~~
a.cc: At global scope:
a.cc:80:16: error: expected unqualified-id before 'long'
   80 |  long long int(long long int n, long long int m)
      |                ^~~~
a.cc:80:16: error: expected ')' before 'long'
   80 |  long long int(long long int n, long long int m)
      |               ~^~~~
      |                )
Language: C++

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

const int MOD = 1000000000 + 7;

long long combination(int N_, int R_) {
    const int NUM_ = 1000000010;
    static long long fact[NUM_+1], invfact[NUM_+1], mod_inv[NUM_+1];
    fact[0] = fact[1] = invfact[0] = invfact[1] = mod_inv[1] = 1;
    for (int i = 2; i < NUM_; i++) {
        if (i > N_ && i > R_) break;
        fact[i] = fact[i - 1] * i % MOD;
        mod_inv[i] = mod_inv[MOD % i] * (MOD - MOD / i) % MOD;
        invfact[i] = invfact[i - 1] * mod_inv[i] % MOD;
    }
    return fact[N_] * invfact[R_] % MOD * invfact[N_-R_] % MOD;
}

int main() {
    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 += combination(n, i);
        answer %= MOD;
    }
    cout << answer << endl;
    return 0;
}


Compiler output:
/tmp/ccmIjd3m.o: in function `combination(int, int)':
a.cc:(.text+0x14): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x1f): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x26): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x3b): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x157): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x172): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x18a): relocation truncated to fit: R_X86_64_PC32 against `.bss'
a.cc:(.text+0x1d9): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#define mod 10e9+7
using namespace std;

long long binexp(long long x,long long y)
{
  long long result=1;
  x=x%mod;
  while(y>0)
  {
    if(y%2==1)
      result=(result*x)%mod;
    y=y/2;
    x=(x*x)%mod;
  }
  return result;
}
int main();
{
  long long n,a,b;
  cin>>n>>a>>b;
  
  return 0;
}


Compiler output:
a.cc: In function 'long long int binexp(long long int, long long int)':
a.cc:8:6: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
    8 |   x=x%mod;
      |     ~^
      |     |
      |     long long int
a.cc:12:24: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   12 |       result=(result*x)%mod;
      |              ~~~~~~~~~~^
      |                     |
      |                     long long int
a.cc:14:12: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   14 |     x=(x*x)%mod;
      |       ~~~~~^
      |         |
      |         long long int
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before '{' token
   19 | {
      | ^
Language: Java

public class Main {
    static long mod = 1000000007;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), a = sc.nextInt(), b = sc.nextInt();
        long ans = pow(2, n) - comb(n, a) - comb(n, b) - 1;
        if(ans > 0) ans = (Math.abs(ans) / mod + 1) * mod; 
        System.out.println(ans);
    }
    static long pow(long x, long n) {
        long result = 1;
        while(n > 0) {
            if(n % 2 == 1) result = (result * x) % mod;
            x = (x * x) % mod;
            n >>= 1;
        }

        return result;
    }
    static long comb(long n, long r) {
        long mol = 1, den = 1;
        r = Math.min(r, n - r);
        for(long i = n - r + 1; i <= n; i++) mol = (mol * i) % mod;
        for(long i = 1; i <= r; i++) den = (den * i) % mod;
        return mol * pow(den, mod - 2) % mod;
    }
}

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

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

ll RepeatSquare(ll x, ll p, ll m){
  if(p==0)
    return 1;
  if(p%2==0){
    ll t= RepeatSquare(x,p/2,m);
    return t*t%m;
  }
  return x*RepeatSquare(x,p-1,m);
}

factrial(ll x,ll y,ll m){
  ll ans=1;
  for(int i=x;i<=y;i++){
    ans *= i;
    ans %= m;
  }
  return ans;
}
  
int main(){
  ll n,a,b;
  cin >> n >> a >> b;
  
  ll ans;
  ans = RepeatSquare(2,n,1000000007)-1;
  
  ll combi_a,combi_b;
  combi_a=factrial(n-a+1,n,1000000007);
  combi_b=factrial(n-b+1,n,1000000007);
  
  combi_a *= RepeatSquare(factrial(1,a,1000000007),1000000005,1000000007);
  combi_b *= RepeatSquare(factrial(1,b,1000000007),1000000005,1000000007);
  
  ans -= (combi_a+combi_b);
  
  ans%=m;
  cout << ans << endl;
  return 0;
}

  
  


Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'factrial' with no type [-fpermissive]
   15 | factrial(ll x,ll y,ll m){
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:40:8: error: 'm' was not declared in this scope
   40 |   ans%=m;
      |        ^
Language: C++

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

ll RepeatSquare(ll x, ll p, ll m){
  if(p==0)
    return 1;
  if(p%2==0){
    ll t= RepeatSquare(x,p/2,m);
    return t*t%m;
  }
  return x*RepeatSquare(x,p-1,m);
}

factrial(ll x,ll y;ll m){
  ll ans=1;
  for(int i=x;i<=y;i++){
    ans *= i;
    ans %= m;
  }
  return ans;
}
  
int main(){
  ll n,a,b;
  cin >> n >> a >> b;
  
  ll ans;
  ans = RepeatSquare(2,n,1000000007)-1;
  
  ll combi_a,combi_b;
  combi_a=factrial(n-a+1,n,1000000007);
  combi_b=factrial(n-b+1,n,1000000007);
  
  combi_a *= RepeatSquare(factrial(1,a,1000000007),1000000005,1000000007);
  combi_b *= RepeatSquare(factrial(1,b,1000000007),1000000005,1000000007);
  
  ans -= (combi_a+combi_b);
  
  ans%=m;
  cout << ans << endl;
  return 0;
}

  
  

Compiler output:
a.cc:15:19: error: expected ')' before ';' token
   15 | factrial(ll x,ll y;ll m){
      |         ~         ^
      |                   )
a.cc:15:19: error: expected constructor, destructor, or type conversion before ';' token
a.cc:15:24: error: expected initializer before ')' token
   15 | factrial(ll x,ll y;ll m){
      |                        ^
a.cc: In function 'int main()':
a.cc:32:11: error: 'factrial' was not declared in this scope
   32 |   combi_a=factrial(n-a+1,n,1000000007);
      |           ^~~~~~~~
a.cc:40:8: error: 'm' was not declared in this scope
   40 |   ans%=m;
      |        ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;++i)
#include<string>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<int, int>P;
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//}

int g[15][15];
const int INF = 1001001001;
const int dx[4] = { -1,0,1,0 };
const int dy[4] = { 0,-1,0,1 };

//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

//素因数分解
vector<pair<ll, int>>factorize(ll n) {
	vector<pair<ll, int>>res;
	for (ll i = 2;i * i <= n;++i) {
		if (n % i)continue;
		res.emplace_back(i, 0);
		while (n % i == 0) {
			n /= i;
			res.back().second++;
		}
	}
	if (n != 1)res.emplace_back(n, 1);
	return res;
}

int dp[1010][1010];
int bingo[3][3];
bool flag[3][3];

ll n;
ll ans = 0;

void dfs(ll x, int a, int b, int c) {
	if (x > n)return;
	if (a && b && c)ans++;
	dfs(10 * x + 3, 1, b, c);
	dfs(10 * x + 5, a, 1, c);
	dfs(10 * x + 7, a, b, 1);
}

ll comb(ll n, ll x) {
	ll res = 1;
	ll big = max(x, n - x);
	ll little = min(x, n - x);
	for (ll i = n;i >= big + 1;--i) {
		res *= i;
	}
	for (ll i = 1;i <= little;++i) {
		res /= i;
	}
	return res;
}

int main() {
	ll n, a, b;
	cin >> n >> a >> b;
	ll ans = 2;
	ll kazu = n;
	if (n % 2 == 0) {
		while (kazu > 1) {
			ans *= ans;
			kazu /= 2;
		}
		ans -= comb(n, a);
		ans -= comb(n, b);
	}
	else {
		kazu--;
		while (kazu > 1) {
			ans *= ans;
			kazu /= 2;
		}
		ans *= 2;
		ans -= comb(n, a);
		ans -= comb(n, b);
	}
	ans--;
	ans = ans % (1e9 + 7);
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:97:19: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   97 |         ans = ans % (1e9 + 7);
      |               ~~~ ^ ~~~~~~~~~
      |               |          |
      |               |          double
      |               ll {aka long long int}
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;
typedef long long ll;

struct int_hash {
    static uint64_t splitmix64(uint64_t x) {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

struct pair_hash {
    size_t operator()(pair<int, int> x) const {
        return int_hash{}(x.first) ^ (int_hash{}(x.second) << 16);
    }
};

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const llj MOD = 1000000007;
const ll INF = numeric_limits<ll>::max();
const int inf = 1e7;
const int MX = 100001; //check the limits, dummy

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

struct Res {
    ll g, x, y;
};

Res modinv(ll a, ll b) {
    if(b == 0) return {a, 1, 0};
    Res prev = modinv(b, a % b);
    return {prev.g, prev.y, prev.x - a / b * prev.y};
}

ll ncr(ll n, ll r) {
    ll ans = 1, den = 1;
    for(int i = n; i > n - r; i--) ans = (ans * i) % MOD;
    for(int i = 2; i <= r; i++) den = (den * i) % MOD;
    ll inv = modinv(den, MOD).x;
    return (ans * (inv + MOD) % MOD) % MOD;
}

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

    ll n, a, b;
    cin >> n >> a >> b;
    ll x = p(2, n);
    ll y = ncr(n, a);
    ll z = ncr(n, b);
    cout << (x - y - z - 1 + MOD) % MOD << endl;
}

Compiler output:
a.cc:31:7: error: 'llj' does not name a type; did you mean 'll'?
   31 | const llj MOD = 1000000007;
      |       ^~~
      |       ll
a.cc: In function 'll p(ll, ll)':
a.cc:39:39: error: 'MOD' was not declared in this scope
   39 |         if(x & 1) ans = (cur * ans) % MOD;
      |                                       ^~~
a.cc:40:29: error: 'MOD' was not declared in this scope
   40 |         cur = (cur * cur) % MOD;
      |                             ^~~
a.cc: In function 'll ncr(ll, ll)':
a.cc:58:54: error: 'MOD' was not declared in this scope
   58 |     for(int i = n; i > n - r; i--) ans = (ans * i) % MOD;
      |                                                      ^~~
a.cc:59:51: error: 'MOD' was not declared in this scope
   59 |     for(int i = 2; i <= r; i++) den = (den * i) % MOD;
      |                                                   ^~~
a.cc:60:26: error: 'MOD' was not declared in this scope
   60 |     ll inv = modinv(den, MOD).x;
      |                          ^~~
a.cc: In function 'int main()':
a.cc:74:30: error: 'MOD' was not declared in this scope
   74 |     cout << (x - y - z - 1 + MOD) % MOD << endl;
      |                              ^~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;
#define MOD 1000000007

ll calc(ll a, ll b, ll p) {
    if (b == 0) {
        return 1;
    } else if (b % 2 == 0) {
        ll d = calc(a, b / 2, p);
        return (d * d) % p;
    } else {
        return (a * calc(a, b - 1, p)) % p;
    }
}

ll modPow(long long a, long long n, long long p) {
  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;
}

ll modFact(int n,int from){
    ll ret = 1;
   cout << "##factrial start## "<< from << endl;
    for(int i = from; i <= n; i++){
        ret = ret * i % MOD;
    }
    cout << "##factrial end## " << ret << endl;
    return ret;
}

ll combn(int n,int r){
   ll num = modFact(n, n-r+1);
   ll tmp;
   cout << "numn "<< num << endl;

    tmp = modFact(r, 1);
    tmp = modPow(tmp, MOD - 2, MOD);
    num = num * tmp % MOD;
    return((int)num);
}



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

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

using ll = long long;
// #define int long long

#define LOG(variable) cout << #variable":\t" << (variable) << endl
#define LOGCON(i, container) for(int (i) = 0; (i) < (container).size(); ++(i)) cout << (i) << ":\t" << (container)[(i)] << endl
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, r, n) for(int i = (n); i >= (r); --i) // from n to r
#define REPOBJ(itr, obj) for(auto itr = (obj).begin(); itr != (obj).end() ; ++itr)
#define REPROBJ(itr, obj) for(auto itr = (obj).rbegin(), e = (obj).rend(); itr != e; ++itr)
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define PI (acos(-1))

// MOD = 1000000007;
// 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 COMB(ll n, ll r) {
  mint ret = 1;
  for(ll i=0; i<r; ++i) ret *= n-i;
  for(ll i=1; i<=r; ++i) ret /= i;
  return ret;
}

/***** MAIN *****/
signed main() {
  ll n, a, b;
  cin >> n >> a >> b;
  cout << ans.x << endl;
  ans -= COMB(n,a) + COMB(n,b);
  cout << ans.x % MOD;
  cout << "\n";
  return 0;
}
/***** MAIN *****/


Compiler output:
a.cc: In function 'int main()':
a.cc:69:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   69 |   cout << ans.x << endl;
      |           ^~~
      |           abs