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 "dango3.h"
#include <bits/stdc++.h>
using namespace std;
bitset<10005> bs;
void Solve(int N, int M) {
for (int i = 0; i < M; ++i) {
vector<int> v;
for (int j = 0; j < N*M; ++j) if (!bs[j]) v.push_back(j+1);
vector<int> v2;
while (!v.empty()) {
int x = v.back(); v.pop_back();
int n = v2.size();
for (int k = 0; k < n; ++k) v.push_back(v2[k]);
if (Query(v) == 0) v2.push_back(x);
for (int k = 0; k < n; ++k) v.pop_back();
}
Answer(v2);
for (int x: v2) bs[x-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... |