Submission #821266

#TimeUsernameProblemLanguageResultExecution timeMemory
821266enerelt14Ancient Machine 2 (JOI23_ancient2)C++17
0 / 100
135 ms312 KiB
#include "ancient2.h" #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <vector> using namespace std; string Solve(int N) { string s(1000, '0'); int m = 1002; vector<int> a(m, 0), b(m, 0); for(int i = 0; i < 1000; i++) { a[i] = i + 2; b[i] = i + 1; a[i + 1] = i + 1; b[i + 1] = i + 1; a[i + 2] = i + 2; b[i + 2] = i + 2; if(Query(m, a, b) == i + 2) s[i] = '1'; a[i] = i + 1; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...