#include "interactive.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define sz(x) int(x.size())
typedef pair<int,int>ii;
typedef vector<int> vi;
vi guess(int n){
vi ans(n);
for(int i=0;i<n;i++)ans[i]=ask(i+1);
return ans;
/*vi ans;
multiset<int> tab[7];
for(int k=0;k<7;k++){
vi ax,ax1;
ax1.pb(1);
for(int i=1;i<n;i++){
if(i&(1<<k)){
ax.pb(i+1);
ax1.pb(i+1);
}
}
vi q=get_pairwise_xor(ax);
vi q1=get_pairwise_xor(ax1);
int i=0,i1=0;
while(!q[i])i++;
while(!q1[i1])i1++;
while(i<sz(q) && i1<sz(q1)){
if(q[i] != q1[i1]){
tab[k].insert({(q1[i1]^a0)});
i1+=2;
}
else{
i+=2;
i1+=2;
}
}
}
for(int i=n-1;i>0;i--){
vi aux;
for(int j=0;j<7;j++){
if(i&(1<<j))aux.pb(j);
}
int ini=aux[0];
for(auto it=tab[ini].begin();it!=tab[ini].end();it++){
int cur=*it;
bool ok=true;
for(int k=1;k<sz(aux);k++)if(!tab[aux[k]].count(cur)){
ok=false;
break;
}
if(ok){
ans.pb(cur);
for(int k=0;k<sz(aux);k++){
tab[aux[k]].erase(tab[aux[k]].find(cur));
}
break;
}
}
}
ans.pb(a0);
reverse(ans.begin(),ans.end());
return ans;*/
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
364 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
0 ms |
364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |