0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-09-20 01:25:24 +00:00
OI-codes/AtCoder/ABC244/C/C.cpp

24 lines
372 B
C++

#include <iostream>
using std::cin;
using std::cout;
using std::endl;
const int N = 2005;
int n, x;
bool tag[N];
int main() {
std::ios::sync_with_stdio(false);
cin >> n;
do {
tag[x] = true;
int t = 0;
while (tag[++t] && t <= 2 * n + 1) {}
tag[t] = true;
cout << t << endl;
} while (cin >> x, x);
return 0;
}