# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
821282 | enerelt14 | Ancient Machine 2 (JOI23_ancient2) | C++17 | 199 ms | 428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 + 1) s[i] = '1';
a[i] = i + 1;
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |