mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:31:59 +00:00
parent
0bc6eec9da
commit
970efada90
27
AtCoder/ABC245/B/B.cpp
Normal file
27
AtCoder/ABC245/B/B.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user