Submission #820552

#TimeUsernameProblemLanguageResultExecution timeMemory
820552t6twotwoAncient Machine 2 (JOI23_ancient2)C++17
10 / 100
111 ms636 KiB
#include "ancient2.h" #include <bits/stdc++.h> using namespace std; using ll = long long; string Solve(int N) { string s(N, '0'); for (int i = 0; i < N; i++) { int m = i + 3; vector<int> a(m), b(m); for (int j = 0; j < i; j++) { a[j] = b[j] = j + 1; } a[i] = i + 1; b[i] = i + 2; a[i + 1] = b[i + 1] = i + 1; a[i + 2] = b[i + 2] = i + 2; if (Query(m, a, b) == i + 2) { s[i] = '1'; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...