diff --git a/AtCoder/ABC244/C/C.cpp b/AtCoder/ABC244/C/C.cpp new file mode 100644 index 00000000..431d8984 --- /dev/null +++ b/AtCoder/ABC244/C/C.cpp @@ -0,0 +1,23 @@ +#include + +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; +}