# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
704950 | piOOE | Super Dango Maker (JOI22_dango3) | C++17 | 1840 ms | 516 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"
#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(228);
void Solve(int n, int m) {
const int N = n * m;
vector<int> ord(N);
iota(ord.begin(), ord.end(), 1);
shuffle(ord.begin(), ord.end(), rnd);
deque<int> st(ord.begin(), ord.end());
while (st.size() > n) {
vector<int> now;
int full = st.size() / n;
while (now.size() < n) {
int x = st.front();
st.pop_front();
if (Query(vector(st.begin(), st.end())) == full - 1) {
now.push_back(x);
continue;
} else {
st.push_back(x);
}
}
Answer(now);
}
Answer(vector(st.begin(), st.end()));
}
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... |