#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
const int N=10005;
void Solve(int n, int m) {
vector<int> vis(N);
for (int i = 0; i < m; i++) {
vector<int> a;
for(int j=1;j<=n*m;j++){
if(!vis[j]){
a.push_back(j);
}
}
int sz=a.size();
vector<int> t(sz,1);
for(int j=0;j<sz;j++){
t[j]=0;
vector<int> v;
for(int k=0;k<sz;k++){
if(t[k]){
v.push_back(a[k]);
}
}
if(Query(v)==0){
t[j]=1;
}
}
vector<int> v;
for(int k=0;k<sz;k++){
if(t[k]){
v.push_back(a[k]);
vis[a[k]]=1;
}
}
Answer(v);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
344 KB |
Output is correct |
2 |
Correct |
9 ms |
444 KB |
Output is correct |
3 |
Correct |
14 ms |
348 KB |
Output is correct |
4 |
Correct |
9 ms |
548 KB |
Output is correct |
5 |
Correct |
8 ms |
348 KB |
Output is correct |
6 |
Correct |
12 ms |
796 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
334 ms |
636 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
770 ms |
680 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |