Submission #480319

#TimeUsernameProblemLanguageResultExecution timeMemory
480319omgCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N) { string R=""; int comboCur=0; string target="AXYZ"; for (int i=0;i<N;i++) { for (int j=0;j<4; j++) { R.push_back(target[j]); if (press(R) > comboCur) break; R.pop_back(); } comboCur++; } cout<<R; return; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:17:3: error: return-statement with no value, in function returning 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-fpermissive]
   17 |   return;
      |   ^~~~~~