Submission #1041169

#TimeUsernameProblemLanguageResultExecution timeMemory
10411697againCup of Jamshid (IOI17_cup)C++17
100 / 100
1 ms348 KiB
#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 timeMemoryGrader output
Fetching results...