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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL<<60;
const ll MOD = 1e9 + 7;

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(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main() {
  ll n,a,b;
  cin >> n >> a >> b;
  ll all = 1;
  for (ll i = 0;i<n;i++) {
    all *= 2;
    all %= MOD;
  }
  cout << all - COM(n,a) - COM(n,b) - 1 << endl; 
  
    
  

}

Compiler output:
a.cc:7:15: error: 'MAX' was not declared in this scope
    7 | long long fac[MAX], finv[MAX], inv[MAX];
      |               ^~~
a.cc:7:26: error: 'MAX' was not declared in this scope
    7 | long long fac[MAX], finv[MAX], inv[MAX];
      |                          ^~~
a.cc:7:36: error: 'MAX' was not declared in this scope
    7 | long long fac[MAX], finv[MAX], inv[MAX];
      |                                    ^~~
a.cc: In function 'void COMinit()':
a.cc:11:5: error: 'fac' was not declared in this scope
   11 |     fac[0] = fac[1] = 1;
      |     ^~~
a.cc:12:5: error: 'finv' was not declared in this scope
   12 |     finv[0] = finv[1] = 1;
      |     ^~~~
a.cc:13:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   13 |     inv[1] = 1;
      |     ^~~
      |     int
a.cc:14:25: error: 'MAX' was not declared in this scope
   14 |     for (int i = 2; i < MAX; i++){
      |                         ^~~
a.cc: In function 'long long int COM(ll, ll)':
a.cc:25:12: error: 'fac' was not declared in this scope
   25 |     return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
      |            ^~~
a.cc:25:22: error: 'finv' was not declared in this scope
   25 |     return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
      |                      ^~~~
Language: C

#include <iostream>
using namespace std;
long long mul(long long x, long long y, long long p) {
    long long ans = 1;
    while (y > 0) {
        if (y%2 != 0) {
            ans *= x;
            ans %= p;
        }
        x *= x;
        x %= p;
        y/=2;
    }
    return ans;
}
int main() {
    long long n,r,p,s,ansc,ans;
    cin >> n >> r >> s;
    p = 1000000007LL;
    long long ansa = 1;
    long long t1 = 1;
    long long t2 = 1;
    for (long long i=1; i<=n; i++) {
        t1 *= i;
        t1 %= p;
    }
    for (long long i=1; i<=r; i++) {
        t2 *= i;
        t2 %= p;
    }
    for (long long i=1; i<=n-r; i++) {
        t2 *= i;
        t2 %= p;
    }
    long long t3 = mul(t2,p-2,p);
    t3 %= p;
    ansa = t1*t3;
    ansa %= p;
    long long ansb = 1;
    t1 = 1;
    t2 = 1;
    for (long long i=1; i<=n; i++) {
        t1 *= i;
        t1 %= p;
    }
    for (long long i=1; i<=s; i++) {
        t2 *= i;
        t2 %= p;
    }
    for (long long i=1; i<=n-s; i++) {
        t2 *= i;
        t2 %= p;
    }
    t3 = mul(t2,p-2,p);
    t3 %= p;
    ansb = t1*t3;
    ansb %= p;
    ansc = mul(2,n,p);
    ans = (ansb+ansa) % p;
    ans = (ansc - 1 - ans) % p;
    printf("%lld", ans);
    return 0;
}
  

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

#include<bits/stdc++.h>
#define int long long int
#define ldouble long double
#define vin vector<int>
#define pqueue priority_queue
#define rep(a,n) for(int i=(a);i<(n);i++)
#define INF (int)1000000007

//setprecision()<<

using namespace std;

void fin(int n,vin &a){
    rep(0,n){
        cin>>a.at(i);
    }
}

int MAX=100000007;
const int MOD = INF;

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;
}
//main関数の中で COMinit(); をしてから用いる

signed main(){
    typedef pair<int,int> P;
    int sum=0;
    int n,a,b;
    cin>>n>>a>>b;
    MAX=n;
    COMinit();
    rep(1,n+1){
        if(a!=i && b!=i){
            sum+=COM(n,i);
            //cout<<COM(n,i)<<endl;
            sum%=INF;
        }
    }
    cout<<sum<<endl;
    return 0;
}

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

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

int Zyo (int n, int m){
  int k = 1;
  for (int i = 0; i < m; i++){
    k *= n;
  }
  return k;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   29 |   cout << sum % (Zyo(10,9) + 7.0) << endl;
      |           ~~~ ^ ~~~~~~~~~~~~~~~~~
      |           |                |
      |           int              double
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    long sum = 0;
    long before = 1;
    
    for(long i=n; i>0; i--){
      if(i != a && i != b){
      long score = before * i / (n - i + 1);
      sum += score;
      before = score;  
      }
    } 
    long answer = sum % (Math.pow(10,9) + 7);
    System.out.println(answer);
  }
}


Compiler output:
Main.java:18: error: incompatible types: possible lossy conversion from double to long
    long answer = sum % (Math.pow(10,9) + 7);
                      ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i)
// const ll MOD=1000000007ll;
const ll MOD=1000000007ll;
const ll MAX=MOD;

ll fact[MAX], fact_inv[MAX];

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

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

int main(){
	ll n,a,b;
    cin>>n>>a>>b;
	fact[0]=1;
        // 階乗の計算
	REP(i, n) fact[i+1]=fact[i]*(i+1)%MOD;
	fact_inv[n]=power(fact[n], MOD-2);
        // 逆元の計算
	FORR(i, 0, n) fact_inv[i]=fact_inv[i+1]*(i+1)%MOD;
        // nCrの計算
        cout<<(power(2ll,n)-comb(n,a)-comb(n,b)-1)%MOD<<endl;
        return 0;
}

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

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    long n = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    long sum = 0;
    long before = 1;
    
    for(long i=n, i>0; i--){
      if(i != a && i != b){
      long score = before * i / (n - i + 1);
      sum += score;
      before = score;  
      }
    } 
    long answer = sum % (Math.pow(10,9) + 7);
    System.out.println(answer);
  }
}

Compiler output:
Main.java:11: error: ';' expected
    for(long i=n, i>0; i--){
                   ^
1 error
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for(int i = 0; i < (n); i++)
//#define MOD (1000000000+7)

using namespace std;
using lint = long long;


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

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

lint comb(lint n, lint r)
{
    lint num = 1;
    if(n < r) return 0;
    for(lint i = 1; i <= r; i++){
        num = (num * (n - i + 1) % MOD * modinv(i, MOD)) % MOD;
    }
    return num;
    
}

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

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

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

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

    lint sum = (n * n - 1) % MOD;
    sum = (sum - COM(n, a));
    if(sum < 0) sum += MOD;
    sum = (sum - COM(n, b));
    if(sum < 0) sum += MOD;

    cout << sum << endl;
   

    return 0;
}

Compiler output:
/tmp/ccKty9j2.o: in function `COMinit()':
a.cc:(.text+0x1d4): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x1df): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x1e6): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x1ed): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x288): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x2e9): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x304): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x31c): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x36b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
/tmp/ccKty9j2.o: in function `COM(int, int)':
a.cc:(.text+0x3e2): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccKty9j2.o
a.cc:(.text+0x3fd): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   21 |   cout << sum % (pow(10,9.0) + 7.0) << endl;
      |           ~~~ ^ ~~~~~~~~~~~~~~~~~~~
      |           |                  |
      |           int                __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
void combination(vector<vector<long long int>> &v){
  for(int i = 0;i <v.size(); i++){
    v[i][0]=1;
    v[i][i]=1;
  }
  for(int k = 1;k <v.size();k++){
    for(int j = 1;j<k;j++){
      v[k][j]=(v[k-1][j-1]+v[k-1][j]);
    }
  } 
}
int main(){
  int n,a,b;
  long long int ans=0;
  cin>>n>>a>>b;
  vector<vector<long long int> > v(n+1,vector<long long int>(n+1,0));
  combination(v);
  for(int i=0;i<n;i++){
    if(i==a||i==b){continue;}
    else{
      sum=(sum+v[n][i])%MOD;
    }
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: 'sum' was not declared in this scope
   24 |       sum=(sum+v[n][i])%MOD;
      |       ^~~
a.cc:27:9: error: 'sum' was not declared in this scope
   27 |   cout<<sum<<endl;
      |         ^~~
Language: C++

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

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

#include <algorithm>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
constexpr int kMod = 1000000007;
typedef long long LL;


static constexpr int kMax = 1e9 + 1;
LL fact[kMax];
LL inv[kMax];
LL finv[kMax];

class Comb {
 public:
  Comb(int n) {
    fact[0] = fact[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < n; i++){
      fact[i] = fact[i-1] * i % kMod;
      inv[i] = kMod - inv[kMod%i] * (kMod / i) % kMod;
      finv[i] = finv[i-1] * inv[i] % kMod;
    }
  }

  LL nCr(int n, int r) const {
    LL numerator = fact[n];
    LL denominator = finv[r] * finv[n-r] % kMod;
    return (numerator * denominator) % kMod;
  }

 private :
};

int main() {
  LL n, a, b; std::cin >> n >> a >> b;
  Comb c(n+1);

  LL ans = 1;
  for (int i = 0; i < n; ++i) ans = (2*ans) % kMod;
  --ans;
  
  ans = (ans + kMod - c.nCr(n, a)) % kMod;
  ans = (ans + kMod - c.nCr(n, b)) % kMod;

  std::cout << ans << std::endl;
}


Compiler output:
/tmp/ccZMdzvx.o: in function `Comb::Comb(int)':
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x40): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0xdb): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x13c): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x157): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x16f): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZN4CombC2Ei[_ZN4CombC5Ei]+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
/tmp/ccZMdzvx.o: in function `Comb::nCr(int, int) const':
a.cc:(.text._ZNK4Comb3nCrEii[_ZNK4Comb3nCrEii]+0x3a): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccZMdzvx.o
a.cc:(.text._ZNK4Comb3nCrEii[_ZNK4Comb3nCrEii]+0x55): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef long long unsigned ull;
using namespace std;
#define chmax(x, y) x = max(x,y);

const ll MAX = 1000000001;
const ll MOD = 1000000007;
ull fac[MAX], finv[MAX], inv[MAX];

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

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


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

ll ans=1;
for (ll i=0; i<n; i++){
  ans*=2;
  ans%MOD;
}
ans-=1;
COMinit();
ans-=(COM(n,a)+COM(n,b));

while(ans<0){
  ans+=MOD;
}
cout<<ans;
}


Compiler output:
/tmp/cc0ke39L.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/cc0ke39L.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x138): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x14f): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x191): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc0ke39L.o
/tmp/cc0ke39L.o: in function `COM(int, int)':
a.cc:(.text+0x20a): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cc0ke39L.o
a.cc:(.text+0x225): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef long long unsigned ull;
using namespace std;
#define chmax(x, y) x = max(x,y);

const ll MAX = 1000000001;
const ll MOD = 1000000007;
ull fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll 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;
    }
}
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

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


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

ll ans=1;
for (ll i=0; i<n; i++){
  ans*=2;
  ans%MOD;
}
ans-=1;
COMinit();
ans-=(COM(n,a)+COM(n,b));

while(ans<0){
  ans+=MOD;
}
cout<<ans;
}


Compiler output:
a.cc:22:6: error: redefinition of 'void COMinit()'
   22 | void COMinit() {
      |      ^~~~~~~
a.cc:12:6: note: 'void COMinit()' previously defined here
   12 | void COMinit() {
      |      ^~~~~~~
Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef long long unsigned ull;
using namespace std;
#define chmax(x, y) x = max(x,y);

const ll MAX = 1000000001;
const ll MOD = 1000000007;
ull fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll 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;
    }
}
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

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


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

ll ans=1;
for (ll i=0; i<n; i++){
  ans*=2;
  ans%MOD;
}
ans-=1;
//COMinit();
ans-=(COM(n,a)+COM(n,b));

while(ans<0){
  ans+=MOD;
}
cout<<ans;
}


Compiler output:
a.cc:22:6: error: redefinition of 'void COMinit()'
   22 | void COMinit() {
      |      ^~~~~~~
a.cc:12:6: note: 'void COMinit()' previously defined here
   12 | void COMinit() {
      |      ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll MOD = 1e9 +7;
const ll MAXN = 1e6 + 5;

inline ll quickpow(ll a, ll b){
	ll ans = 1;
	ll base = a % MOD;
	while(b){
		if(b & 1){
			ans = (ans % MOD * base % MOD) % MOD;
		}
		base = (base % MOD * base % MOD) % MOD;
		b = b >> 1;
	}
	ans %= MOD;
	return  ans;
}

ll p=MOD;

inline ll qpow(ll a,ll b){
    if(b==1) return a;
    ll t=qpow(a,b/2);
    t=t*t%p;
    if(b&1) t=t*a%p;
    return t;
}
inline ll C(ll n,ll m){
    if(n<m) return 0;
    if(m>n-m) m=n-m;
    ll a=1,b=1;
    for(int i=0;i<m;i++){
        a=(a*(n-i))%p;
        b=(b*(i+1))%p;
    }
    return a*qpow(b,p-2)%p;
}
inline ll Lucas(ll n,ll m){
    if(m==0) return 1;
    return Lucas(n/p,m/p)*C(n%p,m%p)%p;
}


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll n,x,y;
	cin>>n>>x>>y;
	ll u=quickpow(2,n);
	ll v=Lucas(n,x);
	ll w=Lucas(n,y);
	ll t=(v+w)%MOD;
	if(n==2){
		cout<<0;
		return 0;
	}
	else cout<<(MOD+u-1-t))%MOD;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:31: error: expected ';' before ')' token
   60 |         else cout<<(MOD+u-1-t))%MOD;
      |                               ^
      |                               ;
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>

using namespace std;

typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;
typedef vector<s32> vs32;
typedef vector<u32> vu32;
typedef vector<s64> vs64;
typedef vector<u64> vu64;

const double PI=3.14159265358979323846;

#define MIN(x, y) ((x) > (y) ? (y) : (x))

#define rep(i, N) for(int i = 0; i < N; ++i)

#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define MOD 1000000007ULL

#define MAX  1000000001
s64 fac[MAX];

s64 mypow(s64 x, s64 n)
{
    s64 ret = 1;
    while (n > 0)
    {
        if (n & 1)
        {
            ret *= x;
            ret %= MOD;
        }
        x = x * x;
        x %= MOD;
        n >>= 1;
    }
    return ret;
}

s64 Fac(s64 n, s64 r) {
    s64 ret = 1;
    for (s64 i = n; i >= r; --i){
        ret *= i;
        ret %= MOD;
    }
    return ret;
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    s64 n, a, b;
    cin >> n >> a >> b;

    s64 x, y, z;
    x = mypow(2, n) - 1;
    y = Fac(n, n - a + 1) * mypow(Fac(a, 1), MOD - 2);
    y %= MOD;
    z = Fac(n, n - b + 1) * mypow(Fac(b, 1), MOD - 2);
    z %= MOD;

    while (y + z > x) x += MOD;
    cout << (x - y - z) % MOD << "\n";
    return 0;
}



Compiler output:
a.cc:18:9: error: 'uint64_t' does not name a type
   18 | typedef uint64_t u64;
      |         ^~~~~~~~
a.cc:15:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   14 | #include <cstring>
  +++ |+#include <cstdint>
   15 | 
a.cc:20:9: error: 'uint32_t' does not name a type
   20 | typedef uint32_t u32;
      |         ^~~~~~~~
a.cc:20:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:23:16: error: 'u32' was not declared in this scope; did you mean 's32'?
   23 | typedef vector<u32> vu32;
      |                ^~~
      |                s32
a.cc:23:19: error: template argument 1 is invalid
   23 | typedef vector<u32> vu32;
      |                   ^
a.cc:23:19: error: template argument 2 is invalid
a.cc:25:16: error: 'u64' was not declared in this scope; did you mean 's64'?
   25 | typedef vector<u64> vu64;
      |                ^~~
      |                s64
a.cc:25:19: error: template argument 1 is invalid
   25 | typedef vector<u64> vu64;
      |                   ^
a.cc:25:19: error: template argument 2 is invalid
Language: C++

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

#define rep( i, n, m ) for(int i = ( n ); i < ( m ); i++)
#define rep_d( i, n, m ) for(int i = ( n ) - 1; i >= ( m ); i--)
#define sort_asc( X ) sort(( X ).begin(), ( X ).end())
#define sort_desc( X ) sort(( X ).begin(), ( X ).end(), greater <>())
#define endl "\n"

template <class T> bool chmax( T& a, T b );
template <class T> bool chmin( T& a, T b );
int* eratosthenes( int N );
bool bit_search( int pattern, int N );
void initialize( void );

const ll INF = 1LL << 60;
const int k_mod = 1e9 + 7;
template <typename T, typename K> struct P {
	T a; K b;
};
const int MOD = 1000000007;
long long int* fac, *finv, *inv;

void comInit( int max ) {
	max++;
	fac = new long long int[ max ];
	finv = new long long int[ max ];
	inv = new long long int[ max ];
	fac[ 0 ] = fac[ 1 ] = inv[ 1 ] = finv[ 0 ] = finv[ 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 nCr( int n, int r ) {
	if (n < r || n < 0 || r < 0) return 0;
	return fac[ n ] * ( finv[ r ] * finv[ n - r ] % MOD ) % MOD;
}
long long modpow( long long a, long long n, long long mod ) {
	long long res = 1;
	while (n > 0){
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}
// ll* com;
// ll comInit( ll N, ll K ){
//  com = new ll[K+1];
//  com[ 0 ] = 1;
//  rep( i, 1, K + 1 ){
//      com[ i ] = (( ll )( N - i + 1 ) * com[ i - 1 ] / i) % k_mod;
//  }
// }
int main( void ){
	initialize();
	ll N, A, B;
	cin >> N >> A >> B;
	comInit( N, max( A, B ));
	ll sum = modpow( 2, N, k_mod ) - 1;
	// sum -= com[ A ];
	sum -= nCr( N, A );
	if (sum <= 0)
		sum += k_mod;
	// sum -= com[ B ];
	sum -= nCr( N, B );
	if (sum <= 0)
		sum += k_mod;
	cout << sum << endl;
}

template <class T> bool chmax( T& a, T b ) {
	if (a < b){
		a = b; return true;
	}
	return false;
}
template <class T> bool chmin( T& a, T b ) {
	if (a > b){
		a = b; return true;
	}
	return false;
}
int* eratosthenes( int N ){
	int* prime_array = new int[ N + 1 ];
	int lim = N;
	prime_array[ 0 ] = 0;
	prime_array[ 1 ] = 0;
	rep( i, 2, N + 1 ){
		prime_array[ i ] = 1;
	}
	rep( i, 2, lim ){
		if (prime_array[ i ] == 0)
			continue;
		lim = N / i;
		for(int j = i * 2; j < N + 1; j += i){
			prime_array[ j ] = 0;
		}
	}
	return prime_array;
}
bool bit_search( int pattern, int N ){
	int cnt = 0;
	rep( bit, 0, N ){
		if (pattern & ( 1 << bit )){
			cnt++;
		}
	}
	return true;
}
void initialize( void ){
	cout << fixed << setprecision( 10 );
	cin.tie( 0 );
	ios::sync_with_stdio( false );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:62:16: error: too many arguments to function 'void comInit(int)'
   62 |         comInit( N, max( A, B ));
      |         ~~~~~~~^~~~~~~~~~~~~~~~~
a.cc:25:6: note: declared here
   25 | void comInit( int max ) {
      |      ^~~~~~~
Language: C++

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(){
    int n, a, b;
    cin >> n >> a >> b;

    COMinit();

    int p = n;
    long ans = 1;
    int q = 2;
    while(p > 0){
        if(p&1){
            ans = ans*q;
            ans %= MOD;
        }
        q = q*q;
        q %= MOD;
        p >>= 1;
    }

    long x = COM(n, a);
    long y = COM(n, b);

    cout << ans-1-x-y;

    return 0;
}

Compiler output:
a.cc: In function 'void COMinit()':
a.cc:2:5: error: 'fac' was not declared in this scope
    2 |     fac[0] = fac[1] = 1;
      |     ^~~
a.cc:3:5: error: 'finv' was not declared in this scope
    3 |     finv[0] = finv[1] = 1;
      |     ^~~~
a.cc:4:5: error: 'inv' was not declared in this scope; did you mean 'int'?
    4 |     inv[1] = 1;
      |     ^~~
      |     int
a.cc:5:25: error: 'MAX' was not declared in this scope
    5 |     for (int i = 2; i < MAX; i++){
      |                         ^~~
a.cc:6:35: error: 'MOD' was not declared in this scope
    6 |         fac[i] = fac[i - 1] * i % MOD;
      |                                   ^~~
a.cc: In function 'long long int COM(int, int)':
a.cc:16:12: error: 'fac' was not declared in this scope
   16 |     return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
      |            ^~~
a.cc:16:22: error: 'finv' was not declared in this scope
   16 |     return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
      |                      ^~~~
a.cc:16:46: error: 'MOD' was not declared in this scope
   16 |     return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
      |                                              ^~~
a.cc: In function 'int main()':
a.cc:21:5: error: 'cin' was not declared in this scope
   21 |     cin >> n >> a >> b;
      |     ^~~
a.cc:31:20: error: 'MOD' was not declared in this scope
   31 |             ans %= MOD;
      |                    ^~~
a.cc:34:14: error: 'MOD' was not declared in this scope
   34 |         q %= MOD;
      |              ^~~
a.cc:41:5: error: 'cout' was not declared in this scope
   41 |     cout << ans-1-x-y;
      |     ^~~~
Language: C++

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

const int MAX = 510000;
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 int COM(long long int n, long long int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

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

int main() {
  long long int n, a, b;
  cin >> n >> a >> b;
  cout << (madpow(2, n) - COM(n, a) - COM(n, b)) / MOD << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:12: error: 'madpow' was not declared in this scope; did you mean 'modpow'?
   39 |   cout << (madpow(2, n) - COM(n, a) - COM(n, b)) / MOD << endl;
      |            ^~~~~~
      |            modpow
Language: C++

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

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

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

// 二項係数計算
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()
{
    int n,a,b,all=1;

    cin >> n >> a >> b;
    COMinit();

    rep(i,n) all = (all*2)%MOD;


    cout << (all - COM(n,a) -COM(n,b))%MOD<<endl;

 
    return 0;

}

Compiler output:
/tmp/ccItMtTx.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/ccItMtTx.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x135): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x150): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x168): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/ccItMtTx.o
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/ccItMtTx.o
/tmp/ccItMtTx.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/ccItMtTx.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 int MAX = 510000;
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 int COM(long long int n, long long int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

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

int main() {
  long long int n, a, b;
  cin >> n >> a >> b;
  cout << (madpow(n) - COM(n, a) - COM(n, b)) / MOD << endl;
}


Compiler output:
a.cc: In function 'long long int modpow(long long int)':
a.cc:30:9: error: lvalue required as left operand of assignment
   30 |         2 = 2 * 2 % MOD;
      |         ^
a.cc: In function 'int main()':
a.cc:39:12: error: 'madpow' was not declared in this scope; did you mean 'modpow'?
   39 |   cout << (madpow(n) - COM(n, a) - COM(n, b)) / MOD << endl;
      |            ^~~~~~
      |            modpow
Language: C++

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

int64_t n,a,b;

const int MAX=1e9+10;
int64_t fact[MAX];
int64_t fact_inv[MAX];

int64_t power(int64_t x,int64_t n)
{
    int64_t res=1;
    while(n){
        if(n&1)res=res*x%mod;
        x=x*x%mod;
        n>>=1;
    }
    return res;
}
void init(){
    fact[0]=1;
    for(int i=0;i<n;i++)fact[i+1]=fact[i]*(i+1)%mod;
    fact_inv[n]=power(fact[n],mod-2);
    for(int i=n-1;i>=0;i--)fact_inv[i]=fact_inv[i+1]*(i+1)%mod;
}
int64_t comb(int64_t n,int64_t r)
{
    if(n<0||r<0||n<r)return 0;
    return (fact[n]*fact_inv[r])%mod*fact_inv[n-r]%mod;
}



void solve() 
{
    cin>>n>>a>>b;
    init();
    int ans=0;
    for(ll i=1;i<=n;i++){
        if(i==a||i==b)continue;
        ans+=comb(n,i);
        ans%=mod;
    }cout<<ans<<endl;
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Compiler output:
/tmp/ccDYxE5e.o: in function `init()':
a.cc:(.text+0x1a9): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/ccDYxE5e.o
a.cc:(.text+0x1d3): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/ccDYxE5e.o
a.cc:(.text+0x22a): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/ccDYxE5e.o
/tmp/ccDYxE5e.o: in function `comb(long, long)':
a.cc:(.text+0x298): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/ccDYxE5e.o
a.cc:(.text+0x2e9): relocation truncated to fit: R_X86_64_PC32 against symbol `fact_inv' defined in .bss section in /tmp/ccDYxE5e.o
collect2: error: ld returned 1 exit status
Language: C++

its/stdc++.h>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define pd(a,n) for(int i=0;i<n;i++)cout<<a[i]<<((i==n-1)?"\n":" ")
#define pdd(a,n,m)for(int i=0;i<m;i++)pd(a,m)
#define mp make_pair
#define pb push_back
#define ll long long
//#define __int64 long long
#define P pair<int,int>
#define PP pair<P,int>

ll n,a,b;
ll ans;
ll MOD=1000000007;
const int MAX=422222;

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


// 二項係数計算
ll COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    ll ret=1;
    for(ll i=0;i<k;i++){
      ret*=(n-i);
      ret%=MOD;
    }
    for(ll i=1;i<=k;i++){
      ret%=MOD;
      ret=ret*modinv(i,MOD)%MOD;
    }
    //cout<<n<<" "<<k<<" "<<ret<<endl;
    return ret;
    //return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

/*
ll RepeatSquaring(ll n, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = RepeatSquaring(N, P/2, M);
        return t*t % M;
    }
    return N * RepeatSquaring(N, P-1, M);
}*/
ll hoge(ll n,ll p,ll m){
  if(p==0)return 1;
  if(p%2==0){
      ll t=hoge(n,p/2,m);
      return t*t%m;
  }
  return n*hoge(n,p-1,m);
}


int main(){
  //COMinit();
  cin>>n>>a>>b;
  ans=hoge(2LL,n,MOD);
  ans-=COM(n,a);
  ans+=MOD;
  ans-=COM(n,b);
  ans+=MOD;
  cout<<(ans-1+MOD)%MOD<<endl;

}

Compiler output:
a.cc:1:1: error: 'its' does not name a type
    1 | its/stdc++.h>
      | ^~~
a.cc: In function 'long long int modinv(long long int, long long int)':
a.cc:22:21: error: 'swap' was not declared in this scope
   22 |         a -= t * b; swap(a, b);
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:70:3: error: 'cin' was not declared in this scope
   70 |   cin>>n>>a>>b;
      |   ^~~
a.cc:76:3: error: 'cout' was not declared in this scope
   76 |   cout<<(ans-1+MOD)%MOD<<endl;
      |   ^~~~
a.cc:76:26: error: 'endl' was not declared in this scope
   76 |   cout<<(ans-1+MOD)%MOD<<endl;
      |                          ^~~~
Language: C++

dc++.h>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define pd(a,n) for(int i=0;i<n;i++)cout<<a[i]<<((i==n-1)?"\n":" ")
#define pdd(a,n,m)for(int i=0;i<m;i++)pd(a,m)
#define mp make_pair
#define pb push_back
#define ll long long
//#define __int64 long long
#define P pair<int,int>
#define PP pair<P,int>

ll n,a,b;
ll ans;
ll MOD=1000000007;
const int MAX=422222;

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


// 二項係数計算
ll COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    ll ret=1;
    for(ll i=0;i<k;i++){
      ret*=(n-i);
      ret%=MOD;
    }
    for(ll i=1;i<=k;i++){
      ret%=MOD;
      ret=ret*modinv(i,MOD)%MOD;
    }
    //cout<<n<<" "<<k<<" "<<ret<<endl;
    return ret;
    //return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

/*
ll RepeatSquaring(ll n, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = RepeatSquaring(N, P/2, M);
        return t*t % M;
    }
    return N * RepeatSquaring(N, P-1, M);
}*/
ll hoge(ll n,ll p,ll m){
  if(p==0)return 1;
  if(p%2==0){
      ll t=hoge(n,p/2,m);
      return t*t%m;
  }
  return n*hoge(n,p-1,m);
}


int main(){
  //COMinit();
  cin>>n>>a>>b;
  ans=hoge(2LL,n,MOD);
  ans-=COM(n,a);
  ans+=MOD;
  ans-=COM(n,b);
  ans+=MOD;
  cout<<ans%MOD-1<<endl;

}

Compiler output:
a.cc:1:1: error: 'dc' does not name a type
    1 | dc++.h>
      | ^~
a.cc: In function 'long long int modinv(long long int, long long int)':
a.cc:22:21: error: 'swap' was not declared in this scope
   22 |         a -= t * b; swap(a, b);
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:70:3: error: 'cin' was not declared in this scope
   70 |   cin>>n>>a>>b;
      |   ^~~
a.cc:76:3: error: 'cout' was not declared in this scope
   76 |   cout<<ans%MOD-1<<endl;
      |   ^~~~
a.cc:76:20: error: 'endl' was not declared in this scope
   76 |   cout<<ans%MOD-1<<endl;
      |                    ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
int factorial(int ni){
        int answer = 1;
	while(ni > 1){
	    answer *= ni;
	    ni--;
	}
        return answer;
    }
int calcNumOfCombination(int c, int d){
        return factorial(c) / (factorial(d) * factorial(c-d));
    }
int main(){
long long int n,a,b,ans;
ans = 0;
cin >> n >> a >> b;
long long int check;
for(int i = 1; i < n+1; i++){
  if(i != a || i != b){
    check = i;
   ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);

  }

}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:23:32: error: expected primary-expression before 'int'
   23 |    ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);
      |                                ^~~
a.cc:23:39: error: expected primary-expression before 'int'
   23 |    ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);
      |                                       ^~~
Language: C++

#include "stdafx.h"
#include <bits/stdc++.h>
#define f(i,n) for(int i=0;i<n;i++)
#define P pair<int,int>
#define F first
#define S second
#define int long long
#define mod 1000000007
using namespace std;
int mypow(int a, int b, int c) {
	if (b == 0)return 1;
	if (b % 2)return mypow(a, b - 1, c)*a%c;
	int z = mypow(a, b / 2, c);
	return z * z%c;
}
signed main() {
	int a, b, c, d = 1, x, y, z, ans = 1, xy, xz;
	cin >> a >> b >> c;
	f(i, a) {
		d *= i + 1;
		d %= mod;
		ans *= 2;
		ans %= mod;
		if (i + 1 == b)y = d;
		if (i + 1 == c)z = d;
		if (i + 1 == a)x = d;
		if (i + 1 == a - b)xy = d;
		if (i + 1 == a - c)xz = d;
	}
	cout << (mod + mod + ans - x * mypow(xy, mod - 2, mod) % mod*mypow(y, mod - 2, mod) % mod - x * mypow(xz, mod - 2, mod) % mod*mypow(z, mod - 2, mod) % mod - 1) % mod << endl;
}


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

#include<bits/stdc++.h>

using namespace std;
int calcNumOfCombination(int c, int d){
        return factorial(c) / (factorial(d) * factorial(c-d));
    }
int main(){
long long int n,a,b,ans;
ans = 0;
cin >> n >> a >> b;
long long int check;
for(int i = 1; i < n+1; i++){
  if(i != a || i != b){
    check = i;
   ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);

  }

}

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


Compiler output:
a.cc: In function 'int calcNumOfCombination(int, int)':
a.cc:5:16: error: 'factorial' was not declared in this scope
    5 |         return factorial(c) / (factorial(d) * factorial(c-d));
      |                ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:32: error: expected primary-expression before 'int'
   15 |    ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);
      |                                ^~~
a.cc:15:39: error: expected primary-expression before 'int'
   15 |    ans += calcNumOfCombination(int n, int check) % (1000000000 + 7);
      |                                       ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int mod = 1e9 + 7;

int C(int ,int);
int quick_pow(int ,int);

int main(){
	int n, a, b;
	cin >> n >> a >> b;
	int ans = quick_pow(2, n) - 1;
	ans = (1ll * ans - C(n, a) - C(n, b) + mod + mod) % mod;
	cout << ans << endl;
	return 0;
}

int C(int x, int y){
	int sum1 = 1, sum2 = 1;
	for(int i = x; i >= x - y + 1; --i)
		sum1 = 1ll * sum1 * i % mod;
	for(int i = 1; i <= y; ++i)
		sum2 = 1ll * sum2 * i % mod;
	return 1ll * sum1 * quick_pow(sum2, mod - 2) % mod;
}


Compiler output:
/usr/bin/ld: /tmp/ccofa9hK.o: in function `main':
a.cc:(.text+0x4e): undefined reference to `quick_pow(int, int)'
/usr/bin/ld: /tmp/ccofa9hK.o: in function `C(int, int)':
a.cc:(.text+0x1d5): undefined reference to `quick_pow(int, int)'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
long long INF = (long long)1E17;
#define i_7 (long long)(1E9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}

//typedef long long ll;
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}

//配列のSIZEは問題ごとに定義する必要がある。
const int SIZE = 200'010
long long inv[SIZE+1];//各iの逆元を格納する配列。
long long kai[SIZE+1];//i!のmodを格納する配列。
long long invkai[SIZE+1];//各i!の逆元を格納する配列。
const int MOD=i_7;
void invinit(){//上の配列を初期化する関数。
    inv[1]=1;
    for(int i=2;i<=SIZE;i++){
        inv[i] = MOD - ((MOD/i)*inv[MOD%i])%MOD;
    }
    
    kai[0]=invkai[0]=1;
    for(int i=1;i<=SIZE;i++){
        kai[i]=(kai[i-1]*i)%MOD;
        invkai[i]=(invkai[i-1]*inv[i])%MOD;
    }
}

long long comb(long long a, long long b){
    if(b<0 || a<b){
        return 0;
    }
    return mod(kai[a]*mod(invkai[b]*invkai[a-b]));
}

int main(){
  invinit();
  using namespace std;
  long long n, a, b;
  cin>>n>>a>>b;
  long long ans = mod(po(2, n) - 1);
  ans -= comb(n, a);
  ans = mod(ans);
  ans -= comb(n, b);
  ans = mod(ans);
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc:30:1: error: expected ',' or ';' before 'long'
   30 | long long inv[SIZE+1];//各iの逆元を格納する配列。
      | ^~~~
a.cc: In function 'void invinit()':
a.cc:35:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   35 |     inv[1]=1;
      |     ^~~
      |     int