#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 |
1 |
Correct |
1 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 |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
348 KB |
Output is correct |
2 |
Correct |
4 ms |
344 KB |
Output is correct |
3 |
Correct |
5 ms |
348 KB |
Output is correct |
4 |
Correct |
5 ms |
424 KB |
Output is correct |
5 |
Correct |
4 ms |
348 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
152 ms |
548 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
357 ms |
628 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |