Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <utility>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <numeric>

using namespace std;

typedef uint64_t u64;
typedef int64_t s64;
typedef uint32_t u32;
typedef int32_t s32;
typedef vector<s32> vs32;
typedef vector<u32> vu32;
typedef vector<s64> vs64;
typedef vector<u64> vu64;

const double PI=3.14159265358979323846;

#define MAX(x, y) ((x) < (y) ? (y) : (x))
#define MIN(x, y) ((x) > (y) ? (y) : (x))

#define rep(i, N) for(int i = 0; i < N; ++i)

#define CEIL(x, y) (((x) + (y) - 1) / (y))
#define MOD 1000000007ULL

#define IN(l, r, x) ((l) <= (x) && (x) < (r))

vs64 f(2010), finv(2010);

s64 pow_mod(s64 x, s64 n, s64 mod)
{
    s64 ret = 1;
    while (n)
    {
        if (n & 1) ret = ret * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return ret;
}

s64 init(int n)
{
    assert(n <= 2000);
    f[0] = 1;
    rep (i, n)
    {
        f[i + 1] = f[i] * (i + 1) % MOD;
    }
    finv[n] = pow_mod(f[n], MOD - 2, MOD);
    for (int i = n - 1; i >= 0; --i)
    {
        finv[i] = finv[i + 1] * (i + 1) % MOD;
    }
}

s64 comb(int n, int k)
{
    if (n < k || n < 0 || k < 0) return 0;
    return f[n] * finv[n - k] % MOD * finv[k] % MOD;
}


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int s;
    cin >> s;

    init(s);

    s64 ans = 0;
    for (int l = 1; l <= s / 3; ++l)
    {
        ans += comb(s - 2 * l - 1, s - 3 * l);
        ans %= MOD;
    }

    cout << ans << "\n";
    return 0;
}



Compiler output:
a.cc:20:9: error: 'uint64_t' does not name a type
   20 | typedef uint64_t u64;
      |         ^~~~~~~~
a.cc:17:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   16 | #include <numeric>
  +++ |+#include <cstdint>
   17 | 
a.cc:22:9: error: 'uint32_t' does not name a type
   22 | typedef uint32_t u32;
      |         ^~~~~~~~
a.cc:22:9: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:25:16: error: 'u32' was not declared in this scope; did you mean 's32'?
   25 | typedef vector<u32> vu32;
      |                ^~~
      |                s32
a.cc:25:19: error: template argument 1 is invalid
   25 | typedef vector<u32> vu32;
      |                   ^
a.cc:25:19: error: template argument 2 is invalid
a.cc:27:16: error: 'u64' was not declared in this scope; did you mean 's64'?
   27 | typedef vector<u64> vu64;
      |                ^~~
      |                s64
a.cc:27:19: error: template argument 1 is invalid
   27 | typedef vector<u64> vu64;
      |                   ^
a.cc:27:19: error: template argument 2 is invalid
a.cc: In function 's64 init(int)':
a.cc:57:5: error: 'assert' was not declared in this scope
   57 |     assert(n <= 2000);
      |     ^~~~~~
a.cc:17:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   16 | #include <numeric>
  +++ |+#include <cassert>
   17 | 
a.cc:68:1: warning: no return statement in function returning non-void [-Wreturn-type]
   68 | }
      | ^