Submission #347420

#TimeUsernameProblemLanguageResultExecution timeMemory
347420juggernautThe Big Prize (IOI17_prize)C++14
0 / 100
1 ms364 KiB
#include"prize.h" #ifdef EVAL #else #include"grader.cpp" #endif int find_best(int n){ int l=0,r=n-1; while(l<r){ int mid=(l+r)>>1; auto res=ask(mid); if(res[0]|res[1]==0)return mid; else if(res[0])r=mid-1; else l=mid+1; } return l; }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:11:25: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
   11 |         if(res[0]|res[1]==0)return mid;
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...