제출 #1145034

#제출 시각아이디문제언어결과실행 시간메모리
1145034Noproblem29Ancient Machine 2 (JOI23_ancient2)C++20
10 / 100
51 ms564 KiB
#include "ancient2.h" #include <bits/stdc++.h> using namespace std; #define ll long long string Solve(int N) { string res(N,'0'); for(int i=0;i<N;i++){ vector<int>a(i+3),b(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; a[i+1]=i+1; b[i+1]=i+1; a[i+2]=i+2; b[i+2]=i+2; int mask=Query(a.size(),a,b); if(mask==i+1){ res[i]='0'; } else{ res[i]='1'; } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...