#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> guess(int n) {
map<int,int>ani,fri;
int yo=ask(1);
for (int i = 0; i <= 6; ++i)
{
vector<int>cur,cur1;
fri.clear();
for (int j = 1; j < n; ++j)
{
if(j&(1<<i)){
cur.push_back(j+1);
}
}
cur=get_pairwise_xor(cur);
cur1=cur;
cur1.push_back(1);
cur1=get_pairwise_xor(cur1);
for(auto it:cur)fri[it]++;
for(auto it:cur1)fri[it]--;
for(auto it:fri){
if(it.second!=0)
ani[it.first^yo]|=(1<<i);
}
}
vector<int>ans;
ans.resize(n);
for(auto it:ani){
ans[it.second]=it.first;
}
ans[0]=yo;
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
256 KB |
Not correct size |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Not correct size |
2 |
Halted |
0 ms |
0 KB |
- |