# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
814841 | tranxuanbach | Ancient Machine 2 (JOI23_ancient2) | C++17 | 202 ms | 424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ancient2.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int n;
string ans;
}
string Solve(int _n){
n = _n;
ans = string(n, '?');
array <int, 2> cnt;
for (int i = 0; i < n; i++){
vector <int> a(n + 2), b(n + 2);
for (int j = 0; j < i; j++){
a[j] = b[j] = j + 1;
}
a[i] = n;
b[i] = n + 1;
a[n] = b[n] = n;
a[n + 1] = b[n + 1] = n + 1;
if (Query(n + 2, a, b) == n){
ans[i] = '0';
}
else{
ans[i] = '1';
}
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |