# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
620048 | czhang2718 | Super Dango Maker (JOI22_dango3) | C++17 | 16 ms | 468 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;
void Solve(int N, int M) {
vector<vector<int>> dango(M);
for(int i=1; i<=N*M; i++){
auto check=[&](int k)->bool{
dango[k-1].push_back(i);
int r=Query(dango[k-1]);
dango[k-1].pop_back();
return r==dango[k-1].size();
};
int j=0;
for(int k=31-__builtin_clz(M); k>=0; k--){
if(j+(1<<k)<M && check(j+(1<<k))) j+=(1<<k);
}
dango[j].push_back(i);
}
for(int i=0; i<M; i++) Answer(dango[i]);
}
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... |