Submission #430055

#TimeUsernameProblemLanguageResultExecution timeMemory
430055moyindavidThe Big Prize (IOI17_prize)C++17
0 / 100
144 ms200 KiB
#include <bits/stdc++.h> #include <prize.h> using namespace std; int find_best(int n){ for(int y=n/2;y>=0 && y<n;){ vector<int> a = ask(y); if(a[0]==1){ y/=2; } else if(a[1]==1){ y+=y/2; } else{ return y; } } }

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...