이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <vector>
#include <cassert>
using namespace std;
namespace {
}
void Solve(int n, int m) {
vector<bool> used(n*m);
for (int t = 0; t < m; t++) {
vector<int> here;
for (int i = 0; i < n*m; i++) if (!used[i]) {
here.push_back(i + 1);
}
for (int i = 0; i < (int)here.size(); i++) {
int orig = here[i];
here.erase(here.begin() + i);
int res = Query(here);
if (res == 0) here.insert(here.begin() + i, orig);
else i--;
}
Answer(here);
for (int x : here) used[x-1] = 1;
}
}
# | 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... |