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 "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});
ans.pb(in[2] ^ (ans.back()));
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |