#include<bits/stdc++.h>
#include "dango3.h"
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void Solve(int n,int m){
int B[30]={0,1,1,1,1,1,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5};
deque<int>all;
for (int i=1;i<=n*m;i++)
all.push_back(i);
for (int i=1;i<=m;i++){
bool find=1;
while (find){
shuffle(all.begin(),all.end(),rng);
deque<int>now;
ok.clear();
int sz=all.size();
for (int j=0;j<sz/B[i];j++){
now.push_front(all[sz-j-1]);
}
int Q=Query(now);
if (Q==0) continue;
else {
int nsz=now.size();
for (int i=0;i<nsz;i++){
int out=now.back();
now.pop_back();
all.pop_back();
int nq=Query(now);
if (nq==0){
now.push_front(out);
}
else all.push_front(out);
}
find=0;
Answer(now);
}
}
}
}
Compilation message
dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:15:13: error: 'ok' was not declared in this scope
15 | ok.clear();
| ^~
dango3.cpp:20:25: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'std::deque<int>'
20 | int Q=Query(now);
| ^~~
In file included from dango3.cpp:2:
dango3.h:5:35: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
5 | int Query(const std::vector<int> &x);
| ~~~~~~~~~~~~~~~~~~~~~~~~^
dango3.cpp:28:34: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'std::deque<int>'
28 | int nq=Query(now);
| ^~~
In file included from dango3.cpp:2:
dango3.h:5:35: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
5 | int Query(const std::vector<int> &x);
| ~~~~~~~~~~~~~~~~~~~~~~~~^
dango3.cpp:35:24: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'std::deque<int>'
35 | Answer(now);
| ^~~
In file included from dango3.cpp:2:
dango3.h:6:37: note: in passing argument 1 of 'void Answer(const std::vector<int>&)'
6 | void Answer(const std::vector<int> &a);
| ~~~~~~~~~~~~~~~~~~~~~~~~^