# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1033133 | adaawf | Super Dango Maker (JOI22_dango3) | C++17 | 0 ms | 0 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 <iostream>
#include <vector>
#include "dango.h"
using namespace std;
vector<int> trya(vector<int> v, int x) {
vector<int> vv;
for (int w : v) {
if (w != x) {
vv.push_back(w);
}
}
return vv;
}
void Solve(int n, int m) {
vector<int> v;
vector<vector<int>> res;
for (int i = 1; i <= n * m; i++) {
v.push_back(i);
}
for (int i = 1; i <= m; i++) {
vector<int> vv;
for (int w : vv) {
if (Query(trya(vv, w)) != 0) {
vv = trya(vv, w);
}
}
res.push_back(vv);
for (int w : vv) v = trya(v, w);
}
for (auto w : res) Answer(w);
}