Submission #230184

#TimeUsernameProblemLanguageResultExecution timeMemory
230184AngusRitossaCup of Jamshid (IOI17_cup)C++14
100 / 100
5 ms384 KiB
#include "cup.h" #include <bits/stdc++.h> using namespace std; vector<int> find_cup() { int val = -1e9; int xdiff = 0; int res = ask_shahrasb(val, val); for (int i = 0; i < 31; i++) { int r = ask_shahrasb(val+(1 << i), val); if (r == (res^(1 << i))) xdiff |= (1 << i); } int ydiff = res^xdiff; int x = val+xdiff, y = val+ydiff; return { x, y }; }
#Verdict Execution timeMemoryGrader output
Fetching results...