Language: C++

//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

using namespace std;
typedef long long ll;

//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素


template<ll mod> class modint{
public:
    ll val=0;
    //constexpr modint(ll x=0):val(x%mod){while(x<0)x+=mod;}
    //constexpr ll getmod(){return mod;}
    //constexpr ll getvalue(){return val;}
    //constexpr const ll &value(){return val;}
    constexpr modint operator +(const modint &r){return modint(*this)+=r;}
    constexpr modint operator -(const modint &r){return modint(*this)-=r;}
    constexpr modint operator *(const modint &r){return modint(*this)*=r;}
    constexpr modint operator /(const modint &r){return modint(*this)/=r;}
    constexpr modint& operator +=(const modint &r){
        val+=r.val;
        if(val>=mod)val-=mod;
        return *this;
    }
    constexpr modint& operator -=(const modint &r){
        if(val<r.val)val+=mod;
        val-=r.val;
        return *this;
    }
    constexpr modint& operator *=(const modint &r){
        val=val*r.val%mod;
        return *this;
    }
    constexpr modint& operator /=(const modint &r){
        ll a=r.val,b=mod,u=1,v=0;
        while(b){
            ll 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 modint& r){
        return this->val==r.val;
    }
    constexpr bool operator <(const modint& r){
        return this->val<r.val;
    }
    constexpr bool operator !=(const modint& r){
        return this->val!=r.val;
    }
    friend constexpr ostream& operator <<(ostream &os,const modint<mod>& x){
        return os<<x.val;
    }
    friend constexpr modint<mod> modpow(const modint<mod> &a,ll n){
        if(n==0)return 1;
        modint<mod> t=modpow(a,n/2);
        t=t*t;
        if(n&1)t=t*a;
        return t;
    }
};

using mint = modint<MOD>;


signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    ll n,a,b;cin >> n >> a >> b;
    const mint x=2;
    mint ans=modpow(x,n);
    ans-=1;
    vector<mint> com(b+1);
    FOR(i,1,b){
        if(i==1){
            com[i]=n;
        }else{
            com[i]=com[i-1];
            com[i]*=(n-i+1);
            com[i]/=i;
        }
    }
    ans=ans-com[a]-com[b];
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:114:18: error: conversion from 'int' to non-scalar type 'const mint' {aka 'const modint<1000000007>'} requested
  114 |     const mint x=2;
      |                  ^
a.cc:116:8: error: no match for 'operator-=' (operand types are 'mint' {aka 'modint<1000000007>'} and 'int')
  116 |     ans-=1;
      |     ~~~^~~
a.cc:65:23: note: candidate: 'constexpr modint<mod>& modint<mod>::operator-=(const modint<mod>&) [with long long int mod = 1000000007]'
   65 |     constexpr modint& operator -=(const modint &r){
      |                       ^~~~~~~~
a.cc:65:49: note:   no known conversion for argument 1 from 'int' to 'const modint<1000000007>&'
   65 |     constexpr modint& operator -=(const modint &r){
      |                                   ~~~~~~~~~~~~~~^
a.cc:120:20: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<modint<1000000007> >, modint<1000000007> >::value_type' {aka 'modint<1000000007>'} and 'll' {aka 'long long int'})
  120 |             com[i]=n;
      |                    ^
a.cc:49:24: note: candidate: 'constexpr modint<1000000007>& modint<1000000007>::operator=(const modint<1000000007>&)'
   49 | template<ll mod> class modint{
      |                        ^~~~~~
a.cc:49:24: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const modint<1000000007>&'
a.cc:49:24: note: candidate: 'constexpr modint<1000000007>& modint<1000000007>::operator=(modint<1000000007>&&)'
a.cc:49:24: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'modint<1000000007>&&'
a.cc:123:19: error: no match for 'operator*=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<modint<1000000007> >, modint<1000000007> >::value_type' {aka 'modint<1000000007>'} and 'll' {aka 'long long int'})
  123 |             com[i]*=(n-i+1);
a.cc:70:23: note: candidate: 'constexpr modint<mod>& modint<mod>::operator*=(const modint<mod>&) [with long long int mod = 1000000007]'
   70 |     constexpr modint& operator *=(const modint &r){
      |                       ^~~~~~~~
a.cc:70:49: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const modint<1000000007>&'
   70 |     constexpr modint& operator *=(const modint &r){
      |                                   ~~~~~~~~~~~~~~^
a.cc:124:19: error: no match for 'operator/=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<modint<1000000007> >, modint<1000000007> >::value_type' {aka 'modint<1000000007>'} and 'll' {aka 'long long int'})
  124 |             com[i]/=i;
a.cc:74:23: note: candidate: 'constexpr modint<mod>& modint<mod>::operator/=(const modint<mod>&) [with long long int mod = 1000000007]'
   74 |     constexpr modint& operator /=(const modint &r){
      |                       ^~~~~~~~
a.cc:74:49: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const modint<1000000007>&'
   74 |     constexpr modint& operator /=(const modint &r){
      |                                   ~~~~~~~~~~~~~~^
a.cc: In instantiation of 'constexpr modint<1000000007> modpow(const modint<1000000007>&, ll)':
a.cc:115:20:   required from here
  115 |     mint ans=modpow(x,n);
      |              ~~~~~~^~~~~
a.cc:98:24: error: could not convert '1' from 'int' to 'modint<1000000007>'
   98 |         if(n==0)return 1;
      |                        ^
      |                        |
      |                        int