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 "avoid.h"
#include <vector>
using namespace std;
const int N = 1000, L = 10;
typedef vector<int> vi;
typedef pair<int, int> pi;
pi scout(int q, int b) {
if (q == 10) {
for (int l = 0; l < L; l++) {
vi ii;
for (int i = 0; i < N; i++)
if ((i & 1 << l) != 0)
ii.push_back(i + 1);
send(ii);
}
vi cc = wait();
int i = 0;
for (int l = 0; l < L; l++)
if (cc[l])
i |= 1 << l;
return { i + 1, i + 1 };
} else if (q == 20) {
return { -1, -1 };
} else {
return { -1, -1 };
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |