#include<bits/stdc++.h>
#include "dango3.h"
using namespace std;
vector<int> ans, v2, x;
bool mark[100005];
void Solve(int n, int m) {
for (int Q = 1; Q <= m; Q++) {
for (int i = n * m; i >= 1; i--) if(!mark[i]) x.push_back(i);
ans.clear();
v2 = x;
while(!x.empty()) {
int cur = x.back();
x.pop_back();
v2 = x;
for (int i: ans) v2.push_back(i);
if(Query(v2) == 0) {
ans.push_back(cur);
mark[cur] = true;
}
}
Answer(ans);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
348 KB |
Output is correct |
2 |
Correct |
5 ms |
348 KB |
Output is correct |
3 |
Correct |
6 ms |
344 KB |
Output is correct |
4 |
Correct |
6 ms |
348 KB |
Output is correct |
5 |
Correct |
5 ms |
348 KB |
Output is correct |
6 |
Correct |
6 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
158 ms |
596 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
360 ms |
624 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |