# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
817021 | rainboy | Ancient Machine 2 (JOI23_ancient2) | C++17 | 95 ms | 808 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* upsolved with help from GusterGoose27 */
#include "ancient2.h"
#include <vector>
using namespace std;
typedef vector<int> vi;
const int N = 1000;
string Solve(int n) {
string cc(N, 0);
for (int i = 0; i < N; i++) {
int m = i + 3;
vi aa(m), bb(m);
for (int s = 0; s < i; s++)
aa[s] = bb[s] = s + 1;
aa[i] = i + 1, bb[i] = i + 2;
aa[i + 1] = bb[i + 1] = i + 1;
aa[i + 2] = bb[i + 2] = i + 2;
cc[i] = Query(m, aa, bb) == i + 1 ? '0' : '1';
}
return cc;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |