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