summaryrefslogtreecommitdiff
path: root/packages/cses/problems/1083.cpp
blob: a3cd253c4ecbbe6f50d5fb8b18ebcbb200e2106c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <set>

using ull = unsigned long long;

int main(int argc, char *argv[]) {
  ull n;
  std::cin >> n;

  auto set = std::set<ull>{};

  std::string numstr;
  while (std::getline(std::cin, numstr, ' ')) set.insert(std::stoi(numstr));

  for (auto i = 1; i <= n; i++) {
    if (set.contains(i)) continue;
    std::cout << i;
    break;
  }
}