# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126033 | claudy | Cup of Jamshid (IOI17_cup) | C++14 | 3 ms | 376 KiB |
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 "cup.h"
# include "bits/stdc++.h"
using namespace std;
# define ask ask_shahrasb
vector<int> find_cup() {
vector<int>ans(2);
int orig = ask(0,0);
int signx,signy;
if(ask((1 << 29),0) & (1 << 29)) signx = -1;
else signx = 1;
if(ask(0,(1 << 29)) & (1 << 29)) signy = -1;
else signy = 1;
int x = 0;
for(int i = 0;i < 29;i++)
{
if((orig ^ ask((1 << i) * -signx,0)) != (1 << i)) x += (1 << i);
}
int y = orig ^ x;
x *= signx;
y *= signy;
ans[0] = x;
ans[1] = y;
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |