Submission #305682

#TimeUsernameProblemLanguageResultExecution timeMemory
305682NucleistXoractive (IZhO19_xoractive)C++14
0 / 100
1 ms384 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...