Submission #430064

#TimeUsernameProblemLanguageResultExecution timeMemory
430064moyindavidThe Big Prize (IOI17_prize)C++17
0 / 100
108 ms284 KiB
#include <bits/stdc++.h> #include <prize.h> using namespace std; int find_best(int n){ for(int y=n-1;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:19:1: warning: control reaches end of non-void function [-Wreturn-type]
   19 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...