# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
568911 | nonsensenonsense1 | Super Dango Maker (JOI22_dango3) | C++17 | 775 ms | 596 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 "dango3.h"
int n;
void calc(std::vector<int> &a) {
if (a.size() == n) Answer(a);
else {
int m = a.size() / n / 2;
std::vector<int> b;
for (int i = a.size() - 1; i >= 0; --i) {
int x = a[i];
a.erase(a.begin() + i);
if (Query(a) < m) a.push_back(x);
else b.push_back(x);
}
calc(a);
calc(b);
}
}
void Solve(int n_, int m) {
n = n_;
std::vector<int> a(n * m);
for (int i = 0; i < n * m; ++i) a[i] = i + 1;
calc(a);
}
Compilation message (stderr)
# | 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... |