제출 #117195

#제출 시각아이디문제언어결과실행 시간메모리
117195tjd229Cup of Jamshid (IOI17_cup)C++14
100 / 100
3 ms384 KiB
#include "cup.h" const int s = -1e9; std::vector<int> find_cup() { int x = s, y = s; int diff = ask_shahrasb(x, y); int common = 0; int b = 1; int px = 0, py = 0; for (int i = 0; i < 31; ++i,b+=b) { int d = ask_shahrasb(x + b, y); if (diff&b) { if (diff -b==d) px += b; else py += b; } else if (diff + b == d) common += b; } x += px + common; y += py + common; return{x,y}; }
#Verdict Execution timeMemoryGrader output
Fetching results...