# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041169 | 7again | Cup of Jamshid (IOI17_cup) | C++17 | 1 ms | 348 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 ;
vector<int> find_cup() {
vector<int> result(2);
int INF = -1e9 ;
int a = 0 , xr = ask_shahrasb(INF , INF) ;
for(int i = 0 ; i < 31 ; i++)
{
int R = (1<<i) ;
int Z = ask_shahrasb(INF+R , INF) ;
if(Z == (xr^R))
a += R ;
}
int b = (xr^a) ;
result[0] = a + INF ;
result[1] = b + INF ;
return result ;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |