# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1228400 | SpyrosAliv | Ancient Machine 2 (JOI23_ancient2) | C++20 | 0 ms | 320 KiB |
#include "ancient2.h"
#include <bits/stdc++.h>
using namespace std;
string Solve(int N) {
vector<int> a, b;
int m = 1002;
for (int i = 0; i < m; i++) {
a.push_back(i+1);
b.push_back(i+1);
}
a.back() = m-1;
b.back() = m-1;
string s = "";
for (int i = 0; i < N; i++) {
b[i] = 1001;
int fin = Query(m, a, b);
if (fin == 1001) {
s += '1';
}
else s += '0';
b[i] = i+1;
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |