Submission #1263461

#TimeUsernameProblemLanguageResultExecution timeMemory
1263461piolkCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; vector<char> buttons={'A','B','X','Y'}; string guess_sequence(int N){ string soFar; for (int i=0;i<4;i++){ string b=string(1,buttons[i]); if (press(b)==1){ soFar=b; break; } } while (soFar.size()<N){ for (int i=0;i<4;i++){ if (buttons[i]==soFar[0]) continue; if (press(soFar+buttons[i])>soFar.size()){ soFar.push_back(buttons[i]); break; } } } return soFar; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:13: error: 'press' was not declared in this scope
   10 |         if (press(b)==1){
      |             ^~~~~
combo.cpp:20:17: error: 'press' was not declared in this scope
   20 |             if (press(soFar+buttons[i])>soFar.size()){
      |                 ^~~~~