Language: C++

#include <iostream>
#include <functional>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <map>
#include <iomanip>
#include <complex>
#include <random>
#include <bitset>
#include <list>
// #include <prettyprint.hpp>
using namespace std;
#define repi(i,n) for(int i=0;i<n;++i)
#define rep(i,n) for(ll i=0;i<n;++i)
#define repinvi(i,n) for(int i=n-1;i>=0;--i)
#define sll(n) scanf("%lld", &n);
#define sii(n) scanf("%d", &n);
#define slf(n) scanf("%lf", &n);
#define pll pair<ll,ll>
#define pii pair<int,int>
#define psi pair<si,si>
typedef long long ll;
typedef double lf;
typedef short int si;

// typedef long long ll;
const int mod = 1000000007;
// const int mod = 998244353;
struct mint {
    ll x; // typedef long long ll;
    mint(ll x=0):x((x%mod+mod)%mod){}
    mint operator-() const { return mint(-x);}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
    mint operator+(const mint a) const { return mint(*this) += a;}
    mint operator-(const mint a) const { return mint(*this) -= a;}
    mint operator*(const mint a) const { return mint(*this) *= a;}
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }
    // for prime mod
    mint inv() const { return pow(mod-2);}
    mint& operator/=(const mint a) { return *this *= a.inv();}
    mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
};


void Main(){
    ll N, A, B;
    cin >> N >> A >> B;
    mint n = N;
    mint a = A;
    mint b = B;
    mint total = 2;
    total = total.pow(N);
    mint comb_na = 1;
    mint comb_na_denom = 1;
    mint comb_nb = 1;
    mint comb_nb_denom = 1;

    for(ll i=0;i<A;i++){
        comb_na *= n-i;
        comb_na_denom *= (i+1);
    }
    comb_na /= comb_na_denom;
    for(ll i=0;i<B;i++){
        comb_nb *= n-i;
        comb_nb_denom *= (i+1);
    }
    comb_nb /= comb_nb_denom;
    cout << total - comb_na - comb_nb - 1 <<endl;

    

}

int main(){
    Main();
}

Compiler output:
a.cc: In constructor 'combination::combination(int)':
a.cc:68:5: error: 'assert' was not declared in this scope
   68 |     assert(n < mod);
      |     ^~~~~~
a.cc:16:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   15 | #include <list>
  +++ |+#include <cassert>
   16 | // #include <prettyprint.hpp>