Language: C++

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

ll int Fac(ll int N);
ll int Exp(ll int N, ll int x);
ll int comb(ll int n, ll int r);
const int MOD = 1000000007;

int main()
{
    ll int n, a, b, ans;
    cin >> n >> a >> b;
    ans = (Exp(n, 2, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1) % MOD;
    if (ans < 0)
        ans += MOD;
    cout << ans << endl;
}

ll int Fac(ll int N)
{
    if (N == 0)
    {
        return 1;
    }
    else
    {
        ll int M = (N * Fac(N - 1)) % MOD;
        if (M < 0)
            M += MOD;
        return M;
    }
}

ll int Exp(ll int N, ll int x)
{
    if (N == 0)
    {
        return 1;
    }
    else if (N % 2 == 0)
    {
        ll int A = (Exp(N / 2, x) * Exp(N / 2, x)) % MOD;
        if (A < 0)
            A += MOD;
        return A;
    }
    else
    {
        ll int B = (x * Exp(N - 1, x)) % MOD;
        if (B < 0)
            B += MOD;
        return B;
    }
}

ll int comb(ll int n, ll int r)
{
    ll int A = Fac(r);
    ll int B = 1;
    for (int i = 1; i <= r; i++)
    {
        B = (B * (n - i + 1)) % MOD;
        if (B < 0)
            B += MOD;
    }
    return (B * Exp(MOD - 2, A)) % MOD;
}


Compiler output:
a.cc:5:12: error: two or more data types in declaration of 'N'
    5 | ll int Fac(ll int N);
      |            ^~
a.cc:5:1: error: two or more data types in declaration of 'Fac'
    5 | ll int Fac(ll int N);
      | ^~
a.cc:6:12: error: two or more data types in declaration of 'N'
    6 | ll int Exp(ll int N, ll int x);
      |            ^~
a.cc:6:20: error: expected ')' before ',' token
    6 | ll int Exp(ll int N, ll int x);
      |           ~        ^
      |                    )
a.cc:6:1: error: two or more data types in declaration of 'Exp'
    6 | ll int Exp(ll int N, ll int x);
      | ^~
a.cc:6:25: error: expected initializer before 'int'
    6 | ll int Exp(ll int N, ll int x);
      |                         ^~~
a.cc:7:13: error: two or more data types in declaration of 'n'
    7 | ll int comb(ll int n, ll int r);
      |             ^~
a.cc:7:21: error: expected ')' before ',' token
    7 | ll int comb(ll int n, ll int r);
      |            ~        ^
      |                     )
a.cc:7:1: error: two or more data types in declaration of 'comb'
    7 | ll int comb(ll int n, ll int r);
      | ^~
a.cc:7:26: error: expected initializer before 'int'
    7 | ll int comb(ll int n, ll int r);
      |                          ^~~
a.cc: In function 'int main()':
a.cc:12:5: error: two or more data types in declaration of 'n'
   12 |     ll int n, a, b, ans;
      |     ^~
a.cc:12:5: error: two or more data types in declaration of 'a'
a.cc:12:5: error: two or more data types in declaration of 'b'
a.cc:12:5: error: two or more data types in declaration of 'ans'
a.cc:13:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   13 |     cin >> n >> a >> b;
      |            ^
      |            yn
a.cc:13:17: error: 'a' was not declared in this scope
   13 |     cin >> n >> a >> b;
      |                 ^
a.cc:13:22: error: 'b' was not declared in this scope
   13 |     cin >> n >> a >> b;
      |                      ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans = (Exp(n, 2, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1) % MOD;
      |     ^~~
      |     abs
a.cc:14:12: error: 'Exp' was not declared in this scope; did you mean 'exp'?
   14 |     ans = (Exp(n, 2, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1) % MOD;
      |            ^~~
      |            exp
a.cc:14:29: error: 'comb' was not declared in this scope; did you mean 'wctomb'?
   14 |     ans = (Exp(n, 2, MOD) - comb(n, a, MOD) - comb(n, b, MOD) - 1) % MOD;
      |                             ^~~~
      |                             wctomb
a.cc: At global scope:
a.cc:20:12: error: two or more data types in declaration of 'N'
   20 | ll int Fac(ll int N)
      |            ^~
a.cc:20:1: error: two or more data types in declaration of 'Fac'
   20 | ll int Fac(ll int N)
      | ^~
a.cc:35:12: error: two or more data types in declaration of 'N'
   35 | ll int Exp(ll int N, ll int x)
      |            ^~
a.cc:35:20: error: expected ')' before ',' token
   35 | ll int Exp(ll int N, ll int x)
      |           ~        ^
      |                    )
a.cc:35:1: error: two or more data types in declaration of 'Exp'
   35 | ll int Exp(ll int N, ll int x)
      | ^~
a.cc:35:25: error: expected initializer before 'int'
   35 | ll int Exp(ll int N, ll int x)
      |                         ^~~
a.cc:57:13: error: two or more data types in declaration of 'n'
   57 | ll int comb(ll int n, ll int r)
      |             ^~
a.cc:57:21: error: expected ')' before ',' token
   57 | ll int comb(ll int n, ll int r)
      |            ~        ^
      |                     )
a.cc:57:1: error: two or more data types in declaration of 'comb'
   57 | ll int comb(ll int n, ll int r)
      | ^~
a.cc:57:26: error: expected initializer before 'int'
   57 | ll int comb(ll int n, ll int r)
      |                          ^~~