# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799573 | eltu0815 | Super Dango Maker (JOI22_dango3) | C++17 | 1058 ms | 624 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;
typedef int ll;
typedef pair<ll, ll> pll;
ll chk[100000];
vector<ll> tmp;
vector<ll> tmp2;
vector<ll> ans;
void Solve(int N, int M) {
for(ll i = M; i >= 1; --i) {
ans.clear(); tmp2.clear();
for(ll j = 1; j <= N * M; ++j) if(!chk[j]) tmp2.push_back(j);
random_shuffle(tmp2.begin(), tmp2.end());
for(auto j : tmp2) {
if(ans.size() == N) break;
tmp.clear();
for(auto k : tmp2) if(k != j && !chk[k]) tmp.push_back(k);
if(Query(tmp) == i - 1) chk[j] = 1, ans.push_back(j);
}
Answer(ans);
}
return;
}
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... |