# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
421236 | Pyqe | Cup of Jamshid (IOI17_cup) | C++14 | 1 ms | 204 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 <bits/stdc++.h>
#include "cup.h"
using namespace std;
long long ma=1e9;
vector<int> find_cup()
{
long long i,ii,mk=ask_shahrasb(-ma/2,-ma/2),mk2,mk3,e;
vector<int> v={0,0};
for(i=0;1ll<<i<=ma/2;i++)
{
mk2=ask_shahrasb(-ma/2-(1ll<<i),-ma/2);
mk3=mk^mk2;
e=mk3>>i+1&1;
v[0]|=e<<i;
v[1]|=((mk>>i&1)^e)<<i;
}
mk2=ask_shahrasb(-ma/2+(1ll<<29),-ma/2);
mk3=ask_shahrasb(-ma/2+(1ll<<30),-ma/2);
e=!((mk^mk2)&(1ll<<29)-1)&&((mk^mk3)&(1ll<<30)-1);
v[0]|=e<<29;
v[1]|=((mk>>i&1)^e)<<29;
for(ii=0;ii<2;ii++)
{
v[ii]-=ma/2;
}
return v;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |