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

// hhttps://atcoder.jp/contests/apg4b/tasks/APG4b_ca
// g++ -std=c++11 ex22.cpp && ./a.out
#include <vector>
#include <tuple>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#include <cstdio>
#include <cmath>

using namespace std;

int main()
{
    int N;
    cin >> N;
    vector<int> X(N);
    for (int &xi : X)
    {
        cin >> xi;
    }

    int minsum = INT_MAX;
    for (int p = 1; p <= 100; p++)
    {
        int sum = 0;
        for (int xi : X)
        {
            sum += (xi - p) * (xi - p);
        }
        minsum = min(sum, minsum);
    }

    cout << minsum << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: 'INT_MAX' was not declared in this scope
   26 |     int minsum = INT_MAX;
      |                  ^~~~~~~
a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include <cmath>
  +++ |+#include <climits>
   13 |
Language: C

#include <iostream>
#include<cmath>
#define LL long long
#define N 105
using namespace std;

int main()
{
    int a[N];
    int i,j,k,n;
    cin>>n;
    for(i=0;i<n;i++)
        cin>>a[i];
    int mx=999999999,sum,t;
    for(k=1;k<100;k++){
            sum=0;
        for(i=0;i<n;i++){
            sum+=(a[i]-k)*(a[i]-k);
        }
        if(sum<mx)
        {
            t=i;
            mx=sum;
        }
    }
    cout<<mx;
    return 0;
}


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

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

typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector <ll> vi;
typedef vector <pi> vpi;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0)
#define INF 1e9
int N,X[101];

int main(){
	fast;
	
	cin>>N;
	
	FOR(i,0,N-1) cin>>X[i];
	
	
	int ans = INF;
	
	FOR(i,1,100){
		int cur = 0;
		FOR(j,0,N-1) cur += pow(X[j] - i,2);
		
		ans = min(ans,cur);
	}
	cout<<ans;
}




Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | N#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'N' does not name a type
    1 | N#include <bits/stdc++.h>
      | ^
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<ll,ll> pi;
      |         ^~~~
a.cc:6:9: error: 'vector' does not name a type
    6 | typedef vector <ll> vi;
      |         ^~~~~~
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector <pi> vpi;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:18:14: error: 'ios_base' has not been declared
   18 | #define fast ios_base::sync_with_stdio(false),cin.tie(0)
      |              ^~~~~~~~
a.cc:23:9: note: in expansion of macro 'fast'
   23 |         fast;
      |         ^~~~
a.cc:18:47: error: 'cin' was not declared in this scope
   18 | #define fast ios_base::sync_with_stdio(false),cin.tie(0)
      |                                               ^~~
a.cc:23:9: note: in expansion of macro 'fast'
   23 |         fast;
      |         ^~~~
a.cc:34:37: error: 'pow' was not declared in this scope
   34 |                 FOR(j,0,N-1) cur += pow(X[j] - i,2);
      |                                     ^~~
a.cc:36:23: error: 'min' was not declared in this scope; did you mean 'main'?
   36 |                 ans = min(ans,cur);
      |                       ^~~
      |                       main
a.cc:38:9: error: 'cout' was not declared in this scope
   38 |         cout<<ans;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,S=0,T=0,x;cin>>N;
  for(int i=0;i<N;i++){cin>>x;S+=x;T+=x*x}
  x=(2*S+N)/(2*N);
  cout<<N*x*x-2*S*x+T;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:42: error: expected ';' before '}' token
    5 |   for(int i=0;i<N;i++){cin>>x;S+=x;T+=x*x}
      |                                          ^
      |                                          ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,x,a[101],sum,ans,ans1;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		sum+=a[i];
	}
	sum/=n;
	for(int i=1;i<=n;i++)
	{
		ans+=(a[i]-sum)*(a[i]-sum);
		ans1+=(a[i]-sum-1)*(a[i]-sum-1);
	}
	printf("%d",min(ans,ans1));
	return 0;
}

Taday 2020/2/22 20:05:38


Compiler output:
a.cc:22:1: error: 'Taday' does not name a type
   22 | Taday 2020/2/22 20:05:38
      | ^~~~~
Language: C++

#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
int main() {
    int n;
    cin >> n;
    auto x = vector<int>(n);
    for (auto &x_i : x)
        cin >> x_i;

    int lowest = 1'000'000'000;
    for (int pos = 1; pos <= 100; pos++) {
        int test = accumulate(x.begin(), x.end(), 0, [pos](auto x_i) { return (x_i - pos) * (x_i - pos); });
        if (test < lowest) {
            lowest = test;
        }
    }

    cout << lowest;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/numeric:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) [with _InputIterator = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Tp = int; _BinaryOperation = main()::<lambda(auto:1)>]':
a.cc:14:30:   required from here
   14 |         int test = accumulate(x.begin(), x.end(), 0, [pos](auto x_i) { return (x_i - pos) * (x_i - pos); });
      |                    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:169:29: error: no match for call to '(main()::<lambda(auto:1)>) (int&, int&)'
  169 |         __init = __binary_op(_GLIBCXX_MOVE_IF_20(__init), *__first);
      |                  ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:54: note: candidate: 'template<class auto:1> main()::<lambda(auto:1)>'
   14 |         int test = accumulate(x.begin(), x.end(), 0, [pos](auto x_i) { return (x_i - pos) * (x_i - pos); });
      |                                                      ^
a.cc:14:54: note:   candidate expects 1 argument, 2 provided
Language: C++

  #include<iostream>
#include<iomanip>
#include<limits>
#include<string>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include"gcd.h"

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

#define big ((ll)(1e9)+7)


int main()
{
  int n;
  cin >> n;
  vector<int> x;
  ll sum = 0;
  for(int i = 0;i < n;i++)
  {
    int X;
    cin >> X;
    x.push_back(X);
    sum += X;
  }
  ll ave = sum/n;
  ave++;
  ll ans = 0;
  for(int i = 0;i < n;i++)
  {
    ans += pow(x[i]-ave,2);
  }
  cout << ans << endl;
}


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

#include <bits/stdc++.h>

#include <atcoder/all>
#include <atcoder/modint.hpp>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint1000000007;

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

    mint output = 2;
    output = output.pow(n);

    mint tmp = 1;
    for (int i = n; i > n - a; i--) {
        tmp *= i;
    }
    for (int i = 1; i <= a; i++) {
        tmp /= i;
    }
    output -= tmp;
    tmp = 1;
    for (int i = n; i > n - b; i--) {
        tmp *= i;
    }
    for (int i = 1; i <= b; i++) {
        tmp /= i;
    }
    output -= tmp;
    output -= 1;

    cout << output.val() << endl;

    return 0;
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
using ll = long long;
const ll MOD = 1e9+7;

struct CombInv{
                const long long MOD = 1e9+7;

                //nPrを返す
                long long Permutation(long long n, long long r){
                        long long tmp = 1;
                        long long i = n;
                        while(i!=n-r){
                                tmp *= i;
                                tmp %= MOD;
                                --i;
                        }
                        return tmp;
                }

                //x!を返す
                long long Factorial(long long x){
                        long long tmp = 1;
                        long long i = 1;
                        while(i<=x){
                                tmp *= i;
                                tmp %= MOD;
                                ++i;
                        }
                        return tmp;
                }

                //x^pを返す
                long long FastPow(long long x, long long p){
                        if(p==1) return x;
                        if(p%2==0){
                                long long sr = FastPow(x, p/2);
                                return (sr*sr)%MOD;
                        }else{
                                long long sr = FastPow(x, (p-1)/2);
                                return ((x*sr)%MOD*sr)%MOD;
                        }
                }

                //1/a≡a^(1e9+7-2)(mod 1e9+7)におけるa^(1e9+7-2)を返す
                long long InverseElement(long long a){
                        return FastPow(a, MOD-2);
                }

                //nCrを返す
                long long Combination(long long n, long long r){
                        return (Permutation(n,r)*(InverseElement(Factorial(r))))%MOD;
                }
};

int main(){
        ll n,a,b,ans;
        cin >> n >> a >> b;
        ModCalc mc;
        ans = mc.FastPow(2, n) - 1;
        ans -= mc.Combination(n,a);
        if(ans<0) ans += MOD;
        ans -= mc.Combination(n,b);
        if(ans<0) cout << ans+MOD << endl;
        else cout << ans << endl;
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:9: error: 'ModCalc' was not declared in this scope
   59 |         ModCalc mc;
      |         ^~~~~~~
a.cc:60:15: error: 'mc' was not declared in this scope
   60 |         ans = mc.FastPow(2, n) - 1;
      |               ^~
Language: C++



#include <bits/stdc++.h>
//#include "bits/stdc++.h"
#include <atcoder/all>

using namespace std;
using namespace atcoder;
typedef long long ll;

/*
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
void Add(ll &pos,ll val){pos=mod(pos+val);}
void mod_print(ll k){
    ll P=50000;
    rep(y,1,P){
        ll x=mod(y*k);
        
        if(abs(x)<=P||x+P>=i_7){
            if(x+P>=i_7){
                x-=i_7;
            }
            cout<<x<<"/"<<y<<endl;
            //cout<<setprecision(5)<<(dd)x/(dd)y;
            return;
        }
    }
    cout<<"nun"<<endl;
}
*/

#include "boost/multiprecision/cpp_int.hpp"
#include "boost/multiprecision/cpp_dec_float.hpp"
namespace mp = boost::multiprecision;
typedef mp::cpp_int LL;
typedef mp::number<mp::cpp_dec_float<1024>> DD;// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)

typedef long double dd;
typedef pair<ll,ll> l_l;
typedef pair<dd,dd> d_d;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define rrep(i,r,l) for(ll i=r;i>=l;i--)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
dd EPS=1E-12;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fi first
#define se second

#define SORT(v) sort(v.begin(),v.end())
#define ERASE(v) v.erase(unique(v.begin(),v.end()),v.end())
#define POSL(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define POSU(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
template<class T,class S>
inline bool chmax(T &a, S b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}
template<class T,class S>
inline bool chmin(T &a, S b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
//#define endl "\n"  //インタラクティブで消す！！！！！！！！！！！！！！！！！！！！！
#define all(c) c.begin(),c.end()
typedef vector<ll> vl;

//using mint = modint998244353;
using mint = modint1000000007;
//////////////////////////

/*
#define N 2000004
mint kai[N];
mint kai2[N];
void calc(){
    kai[0]=1;
    kai2[0]=1;
    rep(i,1,N-1){
        kai[i]=kai[i-1]*i;
    }
    kai2[N-1]=1/kai[N-1];
    for(ll i=N-2;i>=0;i--){
        kai2[i]=kai2[i+1]*(i+1);
    }
}
mint comb(ll n,ll k){
    if(n<k)return 0;
    if(n==0)return 1;
    return kai[n]*kai2[n-k]*kai2[k];
}
*/



mint comb(ll n,ll k){
    mint ans=1;
    rep(i,1,k){
        ans=ans*(n+1-i)/i;
    }
    return ans;
}
int main(){
    
    ll n,a,b;cin>>n>>a>>b;
    mint ans=((mint)2).pow(n)-1;
    ans-=comb(n,a)+comb(n,b);
    cout<<ans.val()<<endl;
    
    
    
    return 0;
}


Compiler output:
a.cc:5:10: fatal error: atcoder/all: No such file or directory
    5 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end() 
ll mod_pow(ll x,ll n,ll mod) {
ll res=1;
  while(n>0) {
     if(n&1) {
       res=res*x%mod;
     }
     x=x*x%mod;
     n>>=1;
   }
   return res;
}
int main() {
  ll mod=1000000007;
  ll n,a,b;
  cin>>n>>a>>b;
  ll A=1;
  ll B=1;
  for(ll i=0;i<a;i++) {
    A*=(n-i);
    A%=mod;
  }
  for(ll i=0;i<b;i++) {
    B*=(n-i);
    B%=mod;
  }
  for(ll i=2;i<=a;i++) {
    A*=mod_pow(i,mod-2,mod);
    A%=mod;
  }
  for(ll i=2;i<=b;i++) {
    B*=mod_pow(i,mod-2,mod);
    B%=mod;
  }
  ll ans=mod_pow(2,n,mod);
  ans--;
  ans-=(A+B);
  if(ans<0) {
    while(ans<0) {
      ans+=mod;
    }
  } 
  cout<<ans<<endl;
|

Compiler output:
a.cc: In function 'int main()':
a.cc:47:1: error: expected primary-expression before '|' token
   47 | |
      | ^
a.cc:47:2: error: expected primary-expression at end of input
   47 | |
      |  ^
a.cc:47:2: error: expected '}' at end of input
a.cc:16:12: note: to match this '{'
   16 | int main() {
      |            ^
Language: C++

/*ॐ नमो भगवते वासुदेवाय नमः*/
#include<bits/stdc++.h>
using namespace std;

#define int long long
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define allrev(x) (x).rbegin(), (x).rend()
#define pb push_back
#define pf push_front
#define fori(i, a, n) for(int i = a; i < n; ++i)
#define MAX(x) (*max_element(all(x)))
#define MIN(x) (*min_element(all(x)))
#define sortarr(a, n) sort(a, a + n)
#define sortvec(V) sort(all(V))

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

typedef unordered_map<int, int, custom_hash> u_map;
typedef unordered_set<int, int, custom_hash> u_set;
typedef vector<int> V;
typedef pair<int , int> pairi;
typedef set<int> seti;
typedef priority_queue<int> p_queue;
typedef deque<int> deqi;

const int MOD = 1e9+7;
const int INF = 1e9+8;
const double pi = 3.14159265359;

int binpow(int a, int b, int m) {
    a %= m;
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}
int inverse(int x){
    return binpow(x, MOD - 2, MOD);
}
int ncr(int n, int k) 
{ 
    int ne = 1, de = 1; 
    if (k > n - k) k = n - k;
    for (int i = 0; i < k; ++i) { 
        de = (de * (i + 1)) % MOD;
        ne = (ne * (n - i)) % MOD;
    }
    return ne * inverse(de) % MOD;
} 
void solve()
{
    int N, A, B;
    cin >> N >> A >> B;
    int ans = binpow(2, N, MOD) - 1 - ncr(N, A) - ncr(N, B);
    if(ans < 0) ans = (ans % MOD + MOD) % MOD
    cout << ans << endl;
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    solve();
    cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \n ";
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:72:46: error: expected ';' before 'cout'
   72 |     if(ans < 0) ans = (ans % MOD + MOD) % MOD
      |                                              ^
      |                                              ;
   73 |     cout << ans << endl;
      |     ~~~~
Language: C++

def modpow(a, n, p):
    if n == 1:
        ans = a % p
    else:
        if n % 2 == 0:
            ans = (modpow(a, n // 2, p) ** 2) % p
        else: # n % 2 == 1
            ans = (a * (modpow(a, n // 2, p) ** 2)) % p

    return ans

p = 10 ** 9 + 7
n, a, b = [int(x) for x in input().split()]

tot = modpow(2, n, p)

Xa, Ya = 1, 1
for i in range(a):
    Xa = (Xa * (n - i)) % p
    Ya = (Ya * (i + 1)) % p
Za = modpow(Ya, p - 2, p)
nCa = (Xa * Za) % p

Xb, Yb = 1, 1
for i in range(b):
    Xb = (Xb * (n - i)) % p
    Yb = (Yb * (i + 1)) % p
Zb = modpow(Yb, p - 2, p)
nCb = (Xb * Zb) % p

ans = (tot - nCa -nCb - 1) % p

print(ans)

Compiler output:
a.cc:7:15: error: stray '#' in program
    7 |         else: # n % 2 == 1
      |               ^
a.cc:1:1: error: 'def' does not name a type
    1 | def modpow(a, n, p):
      | ^~~
Language: C++

/*ॐ नमो भगवते वासुदेवाय नमः*/
#include<bits/stdc++.h>
using namespace std;

#define int long long
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define allrev(x) (x).rbegin(), (x).rend()
#define pb push_back
#define pf push_front
#define fori(i, a, n) for(int i = a; i < n; ++i)
#define MAX(x) (*max_element(all(x)))
#define MIN(x) (*min_element(all(x)))
#define sortarr(a, n) sort(a, a + n)
#define sortvec(V) sort(all(V))

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

typedef unordered_map<int, int, custom_hash> u_map;
typedef unordered_set<int, int, custom_hash> u_set;
typedef vector<int> V;
typedef pair<int , int> pairi;
typedef set<int> seti;
typedef priority_queue<int> p_queue;
typedef deque<int> deqi;

const int MOD = 1e9+7;
const int INF = 1e9+8;
const double pi = 3.14159265359;

int binpow(int a, int b, int m) {
    a %= m;
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}
int inverse(int x){
    return binpow(x, MOD - 2, MOD);
}
int ncr(int n, int k) 
{ 
    int ne = 1, de = 1; 
    if (k > n - k) k = n - k;
    for (int i = 0; i < k; ++i) { 
        de = (de * (i + 1)) % MOD;
        ne = (ne * (n - i)) % MOD;
    }
    return (ne * inv(de)) % MOD;
} 
void solve()
{
    int N, A, B;
    cin >> N >> A >> B;
    int ans = binpow(2, N, MOD);
    ans = (ans + MOD - 1 - ncr(N, A) - ncr(N, B)) % MOD;
    cout << ans << endl;
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    solve();
    cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \n ";
}

Compiler output:
a.cc: In function 'long long int ncr(long long int, long long int)':
a.cc:65:18: error: 'inv' was not declared in this scope; did you mean 'int'?
   65 |     return (ne * inv(de)) % MOD;
      |                  ^~~
      |                  int
Language: C++

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

ll MOD = 1e9+7;

ll m_pow(ll p, ll n){
	if(n==0) return 1;
  	else if(n%2){
    	ll now = m_pow(p,(n-1)/2);
      	return (now*now%MOD)*p%MOD;
    }
  	else{
		ll now = m_pow(p,n/2);
      	return now*now%MOD;
    }
}
  
ll m_comb(ll n, ll k){
	vector<ll> fact(k+1);
  	fact[0] = 1;
  	rep(i,k) fact[i+1] = fact[i]*(i+1)%MOD;
  	ll now = 1;
  	for(ll i=n; i>n-k; --i) now = now*i%MOD;
  	return now*m_pow(fact[k],MOD-2,MOD);
}
  
int main(){
  	ll n, a, b;
  	cin >> n >> a >> b;
  	ll ans = m_pow(2,n)-1-m_comb(n,a)-m_comb(n,b);
  	if(ans < 0) ans += MOD;
  	cout << ans << endl;
  	return 0;
}


Compiler output:
a.cc: In function 'll m_comb(ll, ll)':
a.cc:26:25: error: too many arguments to function 'll m_pow(ll, ll)'
   26 |         return now*m_pow(fact[k],MOD-2,MOD);
      |                    ~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:8:4: note: declared here
    8 | ll m_pow(ll p, ll n){
      |    ^~~~~
Language: C++

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

ll MOD = 1e9+7;

ll m_pow(ll p, ll n){
	if(n==0) return 1;
  	else if(n%2){
    	ll now = m_pow(p,(n-1)/2);
      	return (now*now%MOD)*p%MOD;
    }
  	else{
		ll now = m_pow(p,n/2);
      	return now*now%MOD;
}
  
ll m_comb(ll n, ll k){
	vector<ll> fact(k+1);
  	fact[0] = 1;
  	rep(i,k) fact[i+1] = fact[i]*(i+1)%MOD;
  	ll now = 1;
  	for(ll i=n; i>n-k; --i) now = now*i%MOD;
  	return now*m_pow(fact[k],MOD-2,MOD);
}
  
int main(){
  	ll n, a, b;
  	cin >> n >> a >> b;
  	ll ans = m_pow(2,n)-1-m_comb(n,a)-m_comb(n,b);
  	if(ans < 0) ans += MOD;
  	cout << ans << endl;
  	return 0;
}


Compiler output:
a.cc: In function 'll m_pow(ll, ll)':
a.cc:19:22: error: a function-definition is not allowed here before '{' token
   19 | ll m_comb(ll n, ll k){
      |                      ^
a.cc:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   28 | int main(){
      |         ^~
a.cc:28:9: note: remove parentheses to default-initialize a variable
   28 | int main(){
      |         ^~
      |         --
a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:11: error: a function-definition is not allowed here before '{' token
   28 | int main(){
      |           ^
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:8:21: note: to match this '{'
    8 | ll m_pow(ll p, ll n){
      |                     ^
Language: C++

#include <bits/stdc++.h>
#include<math.h>
#include<algorithm> 
#define rep(i,n) for (int i = 0; i < (n) ; ++i)
using namespace std;
using ll = long long ;
using P = pair<int, int> ;
#define PI 3.14159265358979323846264338327950
#define INF 1e18
ll mod 1000000007 ;

int modpow(ll a, ll n, ll p = mod) {
    if(n == 0) return 1 ;
    if(n == 1) return a%p ;
    if(n%2 == 1) return (a*modpow(a, n-1, p))%p ;
    ll t = modpow(a, n/2, p) ;
    return (t*t) % p ;
}
int main (){
    ll n, a, b ;
    cin >> n >> a >> b ;
    ll da = 1 ; 
    ll db = 1 ;
    ll na = a; 
    ll nb = b;
    rep(i, na){
        ll tm = ((n-i) % mod) * (modpow(a, mod-2)) ;
        tm %= mod ;
        da *= tm ;
        da %= mod ;
        a-- ;
    }
    rep(i, nb){
        ll tm = ((n-i) % mod) * (modpow(b, mod-2));
        tm %= mod ;
        db *= tm ;
        db %= mod ;
        b-- ;
    }
    ll ans = (modpow(2, n) - 1 - da - db  ;
    while(ans < 0){
        ans += mod ;
    }
    ans %= mod ;
    cout << ans << endl ;
}


Compiler output:
a.cc:10:8: error: expected initializer before numeric constant
   10 | ll mod 1000000007 ;
      |        ^~~~~~~~~~
a.cc:12:31: error: 'mod' was not declared in this scope; did you mean 'modf'?
   12 | int modpow(ll a, ll n, ll p = mod) {
      |                               ^~~
      |                               modf
a.cc: In function 'int main()':
a.cc:27:26: error: 'mod' was not declared in this scope; did you mean 'modf'?
   27 |         ll tm = ((n-i) % mod) * (modpow(a, mod-2)) ;
      |                          ^~~
      |                          modf
a.cc:34:26: error: 'mod' was not declared in this scope; did you mean 'modf'?
   34 |         ll tm = ((n-i) % mod) * (modpow(b, mod-2));
      |                          ^~~
      |                          modf
a.cc:40:41: error: expected ')' before ';' token
   40 |     ll ans = (modpow(2, n) - 1 - da - db  ;
      |              ~                          ^ ~
      |                                         )
a.cc:42:16: error: 'mod' was not declared in this scope; did you mean 'modf'?
   42 |         ans += mod ;
      |                ^~~
      |                modf
a.cc:44:12: error: 'mod' was not declared in this scope; did you mean 'modf'?
   44 |     ans %= mod ;
      |            ^~~
      |            modf
Language: C++

#include <bits/stdc++.h>
#include<math.h>
#include<algorithm> 
#define rep(i,n) for (int i = 0; i < (n) ; ++i)
using namespace std;
using ll = long long ;
using P = pair<int, int> ;
#define PI 3.14159265358979323846264338327950
#define INF 1e18
#define mod 1000000007
int modpow(ll a, ll n, ll p = mod) {
    if(n == 0) return 1 ;
    if(n == 1) return a%p ;
    if(n%2 == 1) return (a*modpow(a, n-1, p))%p ;
    ll t = modpow(a, n/2, p) ;
    return (t*t) % p ;
}
int main (){
    ll n, a, b ;
    cin >> n >> a >> b ;
    ll da = 1 ; 
    ll db = 1 ;
    ll na = a; 
    ll nb = b;
    rep(i, na){
        ll tm = (((n-i) % mod) * (modpow(a, mod-2)) ;
        tm %= mod ;
        da *= tm ;
        da %= mod ;
        a-- ;
    }
    rep(i, nb){
        ll tm = (((n-i) % mod) * (modpow(b, mod-2));
        tm %= mod ;
        db *= tm ;
        db %= mod ;
        b-- ;
    }
    ll ans = (modpow(2, n) - 1 - da - db + mod)%mod ;
    cout << ans << endl ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:52: error: expected ')' before ';' token
   26 |         ll tm = (((n-i) % mod) * (modpow(a, mod-2)) ;
      |                 ~                                  ^~
      |                                                    )
a.cc:33:52: error: expected ')' before ';' token
   33 |         ll tm = (((n-i) % mod) * (modpow(b, mod-2));
      |                 ~                                  ^
      |                                                    )
Language: C++

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

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
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, mint& a) { 
  return is >> a.x;
}
ostream& operator<<(ostream& os, const mint& a) { 
  return os << a.x;
}

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

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

Compiler output:
a.cc: In function 'mint choose(int, int)':
a.cc:66:15: error: 'y' was not declared in this scope
   66 |   mint x = 1; y = 1;
      |               ^
Language: C

#include "stdafx.h"
#include<stdio.h>
#include<string.h>

long long int pow_mod(long long int x, long long int y, long long int m)
{
	long long int mod, next_mod;

	if (y == 0)
	{
		return 1;
	}
	else if ((y % 2) == 0) {
		next_mod = pow_mod(x, (y / 2), m);
		mod = (next_mod*next_mod) % m;
	}
	else {
		next_mod = pow_mod(x, ((y - 1) / 2), m);
		mod = (next_mod*next_mod) % m;
		mod = (mod*x) % m;
	}

	return mod;
}

int main()
{
	long long int n, answer = 1, d = 1;
	long long int a, b;
	long long int n_step = 1, a_step, n_a_step, b_step, n_b_step, n_c_a, n_c_b;

	for (int i = 0; i<9; i++)
	{
		d *= 10;
	}

	d += 7;

	scanf_s("%lld %lld %lld", &n, &a, &b);

	for (long long int i = 0; i<n; i++)
	{
		answer *= 2;

		if (answer > d)
		{
			answer %= d;
		}

		n_step *= (i + 1);

		if (n_step >d)
		{
			n_step %= d;
		}

		if ((i + 1) == a)
		{
			a_step = n_step;
		}

		if ((i + 1) == (n - a)) {
			n_a_step = n_step;
		}

		if ((i + 1) == b) {
			b_step = n_step;
		}

		if ((i + 1) == (n - b)) {
			n_b_step = n_step;
		}

	}

	n_c_a = n_step;
	n_c_b = n_step;

	n_c_a *= pow_mod(((a_step)*(n_a_step)), (d - 2), d);
	n_c_b *= pow_mod((((b_step)*(n_b_step))%d), (d - 2), d);

	n_c_a %= d;
	n_c_b %= d;

	answer += 2 * d;

	answer = answer - n_c_a - n_c_b;

	answer += -1;

	answer %= d;

	printf("%lld", answer);

	return 0;
}

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

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

// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
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 {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=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 {
    mint res(*this);
    return res/=a;
  }
};

mint f(int n) {
    if (n == 0) return 1;
    mint x = f(n/2);
    x *= x;
    if (n%2 == 1) x *= 2;
    return x;
}

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

int main() {
    int n, a, b;
    cin >> n >> a >> b;
    mint ans = f(n);
    ans -= 1;
    ans -= choose(n.a);
    ans -= choose(n,b);
    cout << ans.x << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:21: error: request for member 'a' in 'n', which is of non-class type 'int'
   83 |     ans -= choose(n.a);
      |                     ^
Language: C++

#include<stdlib.h>
using ll = long long;
using namespace std;
const int MAX = 510000;
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;
	}
}
ll com(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
ll mod = MOD;
ll pow(ll x, ll n, ll mod) {
	x %= mod;
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return (pow((x * x) % mod, n / 2, mod) % mod);
	else
		return (x * pow(x, n - 1, mod) % mod);
}
main() {
	int n, a, b; cin >> n >> a >> b;
	ll ans = pow(2,n,mod)-1;
	cominit();
	ans += mod;
	ans -= com(n, a);
	ans -= com(n, b);
	ans += 10 * mod;
	ans %= mod;
	cout << ans << endl;
}


Compiler output:
a.cc:32:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   32 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:33:22: error: 'cin' was not declared in this scope
   33 |         int n, a, b; cin >> n >> a >> b;
      |                      ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdlib.h>
  +++ |+#include <iostream>
    2 | using ll = long long;
a.cc:41:9: error: 'cout' was not declared in this scope
   41 |         cout << ans << endl;
      |         ^~~~
a.cc:41:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:24: error: 'endl' was not declared in this scope
   41 |         cout << ans << endl;
      |                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdlib.h>
  +++ |+#include <ostream>
    2 | using ll = long long;
Language: C++

// 2^n -1 - (nCa+nCb)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

const ll MOD = 1000000007;
ll fac[MOD], finv[200009], inv[200009];

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

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MOD; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

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

Compiler output:
/tmp/cclbbrDb.o: in function `COMinit()':
a.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0xc0): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x16b): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x1d1): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x1ec): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x204): relocation truncated to fit: R_X86_64_PC32 against symbol `inv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x253): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
/tmp/cclbbrDb.o: in function `COM(int, int)':
a.cc:(.text+0x2ca): relocation truncated to fit: R_X86_64_PC32 against symbol `finv' defined in .bss section in /tmp/cclbbrDb.o
a.cc:(.text+0x2e5): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define all(x) (x).begin(),(x).end()
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
using Graph = vector<vector<int>>;
const double pi=acos(-1);
template<ll MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};
using mint = Fp<MOD>;
mint nCk(ll n, ll k) {
mint res=1;
for(ll i=0; i<k; i++){
res*=(ll)(n-i);
res/=(ll)(k-i);
}
return res;}
 
int main() {
ll x = 2;
ll n , a , b;
cin>>n>>a>>b;
ll y = 2;
while(n){
if(n&1){
ll x = (x * y) %MOD;}
ll y = y * y;
n /= 2;}
x--;
x -=(nCk(n,a)+nCk(n,b));
cout << x << endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:98:3: error: no match for 'operator-=' (operand types are 'll' {aka 'long long int'} and 'Fp<1000000007>')
   98 | x -=(nCk(n,a)+nCk(n,b));
      | ~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
#include<bits/stdc++.h>

long long int m = 1000000007;
using namespace std;

long long int pow2(long long int a, long long int b){
    long long int resp = 1;
    
    while(b>0){
        if(b & 1){
            resp = resp*a%m;
        }
        a = a*a%m;
        b >>= 1;
    }
    
    return resp;
}

long long int fat(long long int n, long long int b){
    long long int resp=1;
    
    for(int i=b;i<=n;i++){
        resp*=i;
        resp=resp%m;
    }
    return resp;
}

long long int vs[200010];

int main(){
    vs[0]=1;
    
    for(int i=1;i<200005;i++){
        vs[i] = (vs[i-1]*i)%m;
    }

    long long int a,b,c,r,aux,auxb;
    
    cin >> n >> a >> b;
    
    r = pow2(2, a) - 1 ;
    
    auxb = vs[a];
    
    aux = pow2(auxb, m-2) * fat(n,n-b+1) % m;
    r-=aux;
    
    auxb = vs[b];
    aux = pow2(auxb, m-2) * fat(n,n-c+1) % m;
    r-=aux;

    if(r<0){
        r = m + r;
    }
  
    cout << r << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:12: error: 'n' was not declared in this scope
   49 |     cin >> n >> a >> b;
      |            ^
Language: C++

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

int ans = 0;
int N, a, b;

int main() {
    vector<vector<int>> As;
    cin >> N >> a >> b;
    for(int bit=1; bit<(1<<N); ++bit) {
        vector<int> A(N, 0);
        for(int i=0; i<N; ++i) {
            if(1&(bit>>i)) {
                A[i] = 1;
            }
        }
        As.push_back(A);
    }
    int ans = 0;
    for(auto as: As) {
        int cnt=0;
        for(auto a: as) {
            if(a==1) ++cnt; 
        }
        if(cnt != a && cnt != b) {
            ++ans;
        }
    }
    cout << ans << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: expected '}' at end of input
   32 |     cout << ans << endl;
      |                         ^
a.cc:10:12: note: to match this '{'
   10 | int main() {
      |            ^
Language: C

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

using ll = long long; 

const int MOD = 1e9+7;

int mul(int a, int b) {
    return (ll) a * b % MOD;
}

int sub(int a, int b) {
    int c = a - b;
    if (c < 0) {
        c += MOD;
    }
    return c;
}

int my_pow(int x, int e) {
    if (e == 0) {
        return 1;
    }
    
    if (e % 2 == 0) {
        int temp = my_pow(x, e/2);
        return mul(temp, temp);
    }
    else {
        return mul(x, my_pow(x, e-1));
    }
}

int my_inv(int x) {
    return my_pow(x, MOD-2);
}

int nCk(int n, int k) {
    // n! / (n-k)!*k!
    // return mul(fac[n], my_inv(mul(fac[n-k], fac[k])));
    int ans = 1;
    
    for (int i = 1; i <= k; i++) {
        ans = mul( mul(ans, n-i+1), my_inv(i) );
    }
    
    return ans;
}

int main() {
    int n, a, b;
    int n_fac, a_fac, b_fac;
    
    scanf("%d%d%d", &n, &a, &b);
    
    //vector<int> fac(n+1);
    
    //fac[0] = 1;
 
    
    int ans = my_pow(2, n);
    
    ans = sub(ans, nCk(n, a));
    
    ans = sub(ans, nCk(n, b));
    
    ans = sub(ans, 1); // empty set
    
    //int ans = sub(my_pow(2, n), add(nCk(n, a, fac), nCk(n, b, fac)));
    
    printf("%d", ans);
	
	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ASC(x) sort(ALL((x)))
#define DESC(x) sort(ALL((x)),greater<ll>())
#define pb push_back



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

void combinit()
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    REP(i,2,210000) {
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
 
ll combmod(ll n, ll r)
{
    if (n < r) return 0;
    if (n < 0 || r < 0) return 0;
    ll c = 1;
    REP(i,0,r) c = c * (n-i) % MOD;
    c = c * finv[r] % MOD;
    return c;
}

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

    vec inv(200010, 0);
    inv[1] = 1;
    REP(i,2,200010) inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;

    ll nCa = 1, nCb = 1, c;
    REP(i,1,a+1) nCa = (nCa * (n-i+1) % MOD) * inv[i] % MOD;
    REP(i,1,b+1) nCb = (nCb * (n-i+1) % MOD) * inv[i] % MOD;
    c = (modpow(2, n, MOD) - 1- nCa - nCb) % MOD;
    c = (c < 0) ? c + MOD : c;
    PR(c); 

    return 0;
}

/*

nC1 + ... + nCn - nCa - nCb
= 2^n - 1 - nCa - nCb

*/

Compiler output:
a.cc: In function 'void combinit()':
a.cc:37:5: error: 'fac' was not declared in this scope
   37 |     fac[0] = fac[1] = 1;
      |     ^~~
a.cc:38:5: error: 'finv' was not declared in this scope
   38 |     finv[0] = finv[1] = 1;
      |     ^~~~
a.cc:39:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   39 |     inv[1] = 1;
      |     ^~~
      |     int
a.cc: In function 'll combmod(ll, ll)':
a.cc:53:13: error: 'finv' was not declared in this scope
   53 |     c = c * finv[r] % MOD;
      |             ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ASC(x) sort(ALL((x)))
#define DESC(x) sort(ALL((x)),greater<ll>())
#define pb push_back

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

ll modpow(ll n)
{
    ll p = 1;
 
    REP(i,0,n/10) p = p * 1024 % MOD;
    REP(i,0,n%10) p = p * 2 % MOD;
 
    return p;
}

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

    vec inv(200010, 0);
    inv[1] = 1;
    REP(i,2,200010) inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
    
    ll nCa = 1, nCb = 1, c;
    REP(i,1,a+1) nCa = (nCa * (n-i+1) % MOD) * inv[i] % MOD;
    REP(i,1,b+1) nCb = (nCb * (n-i+1) % MOD) * inv[i] % MOD;
    c = modpow(2, n, MOD) - 1- nCa - nCb;
    c = (c >= 0 ? c % MOD : (c + MOD) % MOD);
    PR(c); 

    return 0;
}

/*

nC1 + ... + nCn - nCa - nCb
= 2^n - 1 - nCa - nCb

*/

Compiler output:
a.cc: In function 'int main()':
a.cc:56:15: error: too many arguments to function 'll modpow(ll)'
   56 |     c = modpow(2, n, MOD) - 1- nCa - nCb;
      |         ~~~~~~^~~~~~~~~~~
a.cc:34:4: note: declared here
   34 | ll modpow(ll n)
      |    ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ASC(x) sort(ALL((x)))
#define DESC(x) sort(ALL((x)),greater<ll>())
#define pb push_back

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

ll pow2mod(ll n)
{
    ll p = 1;
 
    REP(i,0,n/10) p = p * 1024 % MOD;
    REP(i,0,n%10) p = p * 2 % MOD;
 
    return p;
}

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

    vec inv(200010, 0);
    inv[1] = 1;
    REP(i,2,200010) inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
    
    ll nCa = 1, nCb = 1, c;
    REP(i,1,a+1) nCa = (nCa * (n-i+1) % MOD) * inv[i] % MOD;
    REP(i,1,b+1) nCb = (nCb * (n-i+1) % MOD) * inv[i] % MOD;
    c = modpow(2, n, MOD) - 1- nCa - nCb;
    c = (c >= 0 ? c % MOD : (c + MOD) % MOD);
    PR(c); 

    return 0;
}

/*

nC1 + ... + nCn - nCa - nCb
= 2^n - 1 - nCa - nCb

*/

Compiler output:
a.cc: In function 'int main()':
a.cc:56:9: error: 'modpow' was not declared in this scope
   56 |     c = modpow(2, n, MOD) - 1- nCa - nCb;
      |         ^~~~~~