#include "ancient2.h"
#include <bits/stdc++.h>
using namespace std;
string Solve(int N) {
string s;
const int M = 1002;
vector<int> a(M);
vector<int> b(M);
iota(a.begin(), a.end(), 0);
b[0] = 1;
b[1] = 1;
a[1] = 1;
for (int i = 0; i < N; i++) {
int ret = Query(M, a, b);
if (ret == i) {
s += '0';
a[i] = i + 1;
} else {
s += '1';
b[i] = i + 1;
}
b[i + 1] = i + 2;
b[i + 2] = i + 2;
}
return s;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
150 ms |
320 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |