Submission #950567

#TimeUsernameProblemLanguageResultExecution timeMemory
950567arbuzickAncient Machine 2 (JOI23_ancient2)C++17
10 / 100
86 ms1832 KiB
#include <bits/stdc++.h> #include "ancient2.h" using namespace std; string Solve(int n) { string ans(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; int val = Query(m, a, b); if (val == i + 1) { ans[i] = '0'; } else { ans[i] = '1'; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...