# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964429 | marinaluca | Super Dango Maker (JOI22_dango3) | C++17 | 268 ms | 952 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;
namespace{
int asa = 1;
void solve (vector <int> v, int x){
if (x == 1){
Answer(v);
return;
}
int mijl = x / 2;
vector <int> rez;
for (int i = v.size(); -- i;){
swap (v[i], v.back());
int y = v.back();
v.pop_back();
if (Query(v) < mijl)
v.push_back(y);
else
rez.push_back(y);
}
solve (v, mijl);
solve(rez, x - mijl);
}
} // namespace
void Solve (int N, int M){
vector <int> v;
for (int i = 0; i < N * M; ++ i)
v.push_back(1 + i);
solve(v, M);
}
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... |