0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-05 03:06:26 +00:00
OI-codes/AtCoder/ABC245/B/B.cpp

28 lines
437 B
C++
Raw Normal View History

#include <iostream>
2022-06-01 01:45:41 +00:00
#include <algorithm>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 2005;
int n;
bool vis[N];
int main() {
std::ios::sync_with_stdio(false);
cin >> n;
for (int i = 1, x; i <= n; i++) {
cin >> x;
vis[x] = true;
}
for (int i = 0; i <= 2000; i++) {
if (!vis[i]) {
cout << i << endl;
exit(0);
}
}
return 0;
}