# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
813401 | arnold518 | Ancient Machine 2 (JOI23_ancient2) | C++17 | 216 ms | 544 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ancient2.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
namespace
{
int N, M;
}
string Solve(int _N)
{
N=_N;
string ans;
M=N+2;
for(int i=0; i<N; i++)
{
vector<int> A(M), B(M);
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<M; j++) A[j]=j, B[j]=j;
int t=Query(M, A, B);
if(t==i+1) ans+="0";
else ans+="1";
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |