Submission #927215

#TimeUsernameProblemLanguageResultExecution timeMemory
927215vjudge1Hotter Colder (IOI10_hottercolder)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int HC(int n) { int l = 1, r = n, mid; int last = n; //Guess(n); while(false) { mid = (l + r) >> 1; int g = 0;//Guess(mid); if(g == 1) { r = mid; } else if(g == -1) { l = mid; } else { cout << (last - mid) / 2; return; } last = mid; } return n; }

Compilation message (stderr)

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:17:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |             return;
      |             ^~~~~~