0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 21:36:36 +00:00

C - Yamanote Line Game

https://atcoder.jp/contests/abc244/submissions/30281264
This commit is contained in:
Baoshuo Ren 2022-03-20 20:18:20 +08:00
parent 767bcb2c2c
commit a9d2dced1e
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

23
AtCoder/ABC244/C/C.cpp Normal file
View File

@ -0,0 +1,23 @@
#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;
}