#include "dango3.h"
#ifdef LOCAL
#include "grader.cpp"
#endif // LOCAL
#include <vector>
void Solve(int n, int m) {
auto query = [&] (std::vector<int> v) {
return Query(v);
};
bool taken[n * m + 1] = {};
for (int baubau = 0; baubau < m; baubau++) {
std::vector<int> cur = {};
for (int i = 1; i <= n * m; i++) {
if (!taken[i]) {
cur.push_back(i);
taken[i] = true;
break;
}
}
taken[1] = true;
for (int rep = 2; rep <= n; rep++) {
std::vector<int> ask = cur;
for (int i = 1; i <= n * m; i++) {
if (taken[i]) {
continue;
}
ask.push_back(i);
if (query(ask) == 1) {
cur.push_back(i);
taken[i] = true;
break;
}
}
}
Answer(cur);
}
}
/**
3 2
3 3 1 2 1 2
4 4
2 2 3 2 4 4 3 2 3 1 1 3 4 1 4 1
**/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
18 ms |
348 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
35 ms |
580 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
73 ms |
612 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |