Submission #674372

#TimeUsernameProblemLanguageResultExecution timeMemory
674372someoneSuper Dango Maker (JOI22_dango3)C++17
100 / 100
725 ms716 KiB
#include <bits/stdc++.h> #include "dango3.h" using namespace std; void dpr(int nb, vector<int> act) { if(nb == 1) { Answer(act); return; } vector<int> del; int mid = nb >> 1, sz = (int)act.size(); for(int i = sz-1; i >= 0; i--) { int val = act[i]; act.erase(act.begin() + i); if(Query(act) >= mid) { del.push_back(val); } else { act.push_back(val); } } dpr(mid, act); dpr(nb - mid, del); } void Solve(int n, int m) { vector<int> act; for(int i = 1; i <= n * m; i++) act.push_back(i); dpr(m, act); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...