This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dango3.h"
#include <vector>
#include <bits/stdc++.h>
#define f first
#define s second
#define vec vector
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pw(x) (1LL<<(x))
#define sz(x) (int)(x).size()
#define m_p make_pair
#define fast_prep ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef long double ld;
template<class T> bool umin(T &a,const T &b){return (a>b?a=b,1:0);}
template<class T> bool umax(T &a,const T &b){return (a<b?a=b,1:0);}
const int N=1e5+1;
const ll inf=1e18;
namespace {
int variable_example = 1;
} // namespace
void Solve(int n, int m) {
vec<int> ids;
for(int i=1;i<=n*m;i++) ids.pb(i);
// queue<vec<int>> q;
// q.push(ids);
int i=0;
while(i!=n*m){
random_shuffle(ids.begin()+i,ids.end());
vec<int> ask;
// for(a
for(int j=0;j<n;j++) ask.pb(ids[i+j]);
// for(auto &z : ask)
if(Query(ask)==1){
Answer(ask);
i+=n;
}
}
}
/*
3 2
3 3 1 2 1 2
*/
Compilation message (stderr)
dango3.cpp:26:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
26 | int variable_example = 1;
| ^~~~~~~~~~~~~~~~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |