Language: C++

#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#define ll long long
long long mod=100000007;
using namespace std;

ll pow(ll x,ll n) {
    ll res = 1;
    x%=mod;
    while (n) {
        if(n&1) res = res*x%mod;
        x = x*x %mod;
        n >>=1;
    }
    return res;
}

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

ll Lucas(ll n,ll m) {
    if(m == 0) return 1;
    return C(n%mod, m%mod) * Lucas(n/mod,m/mod)%mod;
}
ll quick(ll a,ll b)
{
	ll res=1;
	while(b)
	{
		if(b&1)res=res*a%mod;
		a=a*a%mod;
		b>>=1;
	}
	return res%mod;
}
int main()
{
	int n,a,b;
	long long ans=1;
	cin>>n>>a>>b;
	ans=quick(2,n);
	cout<<ans<<endl;
	cout<<Lucas(n,a)<<" "<<Lucas(n,b)<<endl;
	ans=ans-Lucas(n,a)-Lucas(n,b)-1;
	ans%=mod;
	cout<<ans;
}
//2^n-1-Cna-Cnb#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#define ll long long
long long mod=100000007;
using namespace std;

ll pow(ll x,ll n) {
    ll res = 1;
    x%=mod;
    while (n) {
        if(n&1) res = res*x%mod;
        x = x*x %mod;
        n >>=1;
    }
    return res;
}

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

ll Lucas(ll n,ll m) {
    if(m == 0) return 1;
    return C(n%mod, m%mod) * Lucas(n/mod,m/mod)%mod;
}
ll quick(ll a,ll b)
{
	ll res=1;
	while(b)
	{
		if(b&1)res=res*a%mod;
		a=a*a%mod;
		b>>=1;
	}
	return res%mod;
}
int main()
{
	int n,a,b;
	long long ans=1;
	cin>>n>>a>>b;
	ans=quick(2,n);
	cout<<ans<<endl;
	cout<<Lucas(n,a)<<" "<<Lucas(n,b)<<endl;
	ans=ans-Lucas(n,a)-Lucas(n,b)-1;
	ans%=mod;
	cout<<ans;
}
//2^n-1-Cna-Cnb

Compiler output:
a.cc:64:11: error: redefinition of 'long long int mod'
   64 | long long mod=100000007;
      |           ^~~
a.cc:6:11: note: 'long long int mod' previously defined here
    6 | long long mod=100000007;
      |           ^~~
a.cc:67:4: error: redefinition of 'long long int pow(long long int, long long int)'
   67 | ll pow(ll x,ll n) {
      |    ^~~
a.cc:9:4: note: 'long long int pow(long long int, long long int)' previously defined here
    9 | ll pow(ll x,ll n) {
      |    ^~~
a.cc:78:4: error: redefinition of 'long long int C(long long int, long long int)'
   78 | ll C(ll n,ll m) {
      |    ^
a.cc:20:4: note: 'long long int C(long long int, long long int)' previously defined here
   20 | ll C(ll n,ll m) {
      |    ^
a.cc:90:4: error: redefinition of 'long long int Lucas(long long int, long long int)'
   90 | ll Lucas(ll n,ll m) {
      |    ^~~~~
a.cc:32:4: note: 'long long int Lucas(long long int, long long int)' previously defined here
   32 | ll Lucas(ll n,ll m) {
      |    ^~~~~
a.cc:94:4: error: redefinition of 'long long int quick(long long int, long long int)'
   94 | ll quick(ll a,ll b)
      |    ^~~~~
a.cc:36:4: note: 'long long int quick(long long int, long long int)' previously defined here
   36 | ll quick(ll a,ll b)
      |    ^~~~~
a.cc:105:5: error: redefinition of 'int main()'
  105 | int main()
      |     ^~~~
a.cc:47:5: note: 'int main()' previously defined here
   47 | int main()
      |     ^~~~