Submission #282053

#TimeUsernameProblemLanguageResultExecution timeMemory
282053Pichon5The Big Prize (IOI17_prize)C++17
0 / 100
86 ms256 KiB
#include <bits/stdc++.h> #include "prize.h" using namespace std; int find_best(int n) { int a=0,b=n-1; while(a<=b){ int mid=(a+b)/2; vector<int>v=ask(mid); if(v[0]==0 && v[1]==0){ return mid; } if(v[0]==1){ a=mid+1; }else{ b=mid-1; } } }

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type]
   18 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...