Language: C++

#include <iostream>
#include <vector>
#include <string>

std::vector<std::vector<long long>> comb(uint64_t n, uint64_t r) {
  std::vector<std::vector<long long>> v(n + 1,std::vector<long long>(n + 1, 0));
  for (uint64_t i = 0; i < v.size(); i++) {
    v[i][0] = 1;
    v[i][i] = 1;
  }
  for (uint64_t j = 1; j < v.size(); j++) {
    for (uint64_t k = 1; k < j; k++) {
      v[j][k] = (v[j - 1][k - 1] + v[j - 1][k]);
    }
  }
  return v;
}

int main()
{
    uint32_t n;
    uint32_t a;
    uint32_t b;
    uint64_t sum = 0;
    uint64_t ans = 0;
    std::cin >> n >> a >> b;

    /* a,b はbreak 残りはnCkで求める */
    for(uint64_t i = 0; i < n; i++){
        if((i == a) || (i == b)){
            continue;
        }
        
        sum += comb(n, i)[n][i];
    }

    ans = sum % (1000000000 + 7);
    
    std::cout << ans << std::endl;

    return 0;
}



Compiler output:
a.cc:5:42: error: 'uint64_t' was not declared in this scope
    5 | std::vector<std::vector<long long>> comb(uint64_t n, uint64_t r) {
      |                                          ^~~~~~~~
a.cc:3:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <vector>
  +++ |+#include <cstdint>
    3 | #include <string>
a.cc:5:54: error: 'uint64_t' was not declared in this scope
    5 | std::vector<std::vector<long long>> comb(uint64_t n, uint64_t r) {
      |                                                      ^~~~~~~~
a.cc:5:54: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:5:66: error: expected ',' or ';' before '{' token
    5 | std::vector<std::vector<long long>> comb(uint64_t n, uint64_t r) {
      |                                                                  ^
a.cc: In function 'int main()':
a.cc:21:5: error: 'uint32_t' was not declared in this scope
   21 |     uint32_t n;
      |     ^~~~~~~~
a.cc:21:5: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:22:13: error: expected ';' before 'a'
   22 |     uint32_t a;
      |             ^~
      |             ;
a.cc:23:13: error: expected ';' before 'b'
   23 |     uint32_t b;
      |             ^~
      |             ;
a.cc:24:5: error: 'uint64_t' was not declared in this scope
   24 |     uint64_t sum = 0;
      |     ^~~~~~~~
a.cc:24:5: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:25:13: error: expected ';' before 'ans'
   25 |     uint64_t ans = 0;
      |             ^~~~
      |             ;
a.cc:26:17: error: 'n' was not declared in this scope
   26 |     std::cin >> n >> a >> b;
      |                 ^
a.cc:26:22: error: 'a' was not declared in this scope
   26 |     std::cin >> n >> a >> b;
      |                      ^
a.cc:26:27: error: 'b' was not declared in this scope
   26 |     std::cin >> n >> a >> b;
      |                           ^
a.cc:29:17: error: expected ';' before 'i'
   29 |     for(uint64_t i = 0; i < n; i++){
      |                 ^~
      |                 ;
a.cc:29:25: error: 'i' was not declared in this scope
   29 |     for(uint64_t i = 0; i < n; i++){
      |                         ^
a.cc:34:9: error: 'sum' was not declared in this scope
   34 |         sum += comb(n, i)[n][i];
      |         ^~~
a.cc:37:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |     ans = sum % (1000000000 + 7);
      |     ^~~
      |     abs
a.cc:37:11: error: 'sum' was not declared in this scope
   37 |     ans = sum % (1000000000 + 7);
      |           ^~~