Submission #338372

#TimeUsernameProblemLanguageResultExecution timeMemory
338372Edbert2397Xoractive (IZhO19_xoractive)C++14
0 / 100
1 ms364 KiB
#include "interactive.h" #include<bits/stdc++.h> #define pb push_back using namespace std; int x; vector<int> guess(int n) { vector <int> ans; for (int i = 1; i <= n; i++) { if(i&1){ x = ask(i); ans.pb(x); } else{ vector<int > in = get_pairwise_xor({i,i+1}); vector<int>same; for(int i = 1;i<4;i++){ if(in[i] == in[i-1]) { same.pb(in[i]); } } if(same.size() == 1){ ans.pb(same[0] ^ (ans.back())); } else{ ans.pb(in[1]); } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...