#include"bits/stdc++.h"
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class x>
using ordered_set = tree<x, null_type,less<x>, rb_tree_tag,tree_order_statistics_node_update>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//---------------------------------------------------------------------------------------
#include <cstdio>
#include <vector>
#include "library.h"
using namespace std;
long long s=0;
void rec(long long cur,vector <int> grp)
{
long long fr=Query(grp);
grp.push_back(cur);
if(fr+1==Query(grp))
{
if(grp.size()==1)
{
s=grp[0];
}
vector <int> on,tw;
for(int i=0;i<(int)(grp.size()/2);i++)
{
on.push_back(grp[i]);
}
for(int i=grp.size()/2;i<grp.size();i++)
{
tw.push_back(grp[i]);
}
rec(cur,on);
rec(cur,tw);
}
else
return;
}
void Solve(int N)
{
for(int i=1;i<=N;i++)
{
vector <int> ask;
for(int j=1;j<=N;j++)
{
if(i==j)
continue;
ask.push_back(j);
}
long long ans=Query(ask);
if(ans==1)
{
s=i;
break;
}
}
vector <int> ret,lef;
ret.push_back(st);
for(int i=1;i<=N;i++)
{
if(s==i)
continue;
lef.push_back(i);
}
for(int i=1;i<N;i++)
{
rec(s,lef);
ret.push_back(s);
}
Answer(ret);
}
Compilation message
library.cpp: In function 'void rec(long long int, std::vector<int>)':
library.cpp:32:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for(int i=grp.size()/2;i<grp.size();i++)
| ~^~~~~~~~~~~
library.cpp: In function 'void Solve(int)':
library.cpp:62:19: error: 'st' was not declared in this scope; did you mean 's'?
62 | ret.push_back(st);
| ^~
| s