Submission #899530

#TimeUsernameProblemLanguageResultExecution timeMemory
899530SuPythonyCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { vector<string> c={"A","B","X","Y"}; string ans=""; for (int i=0; i<4; i++) { if (press(c[i])) { ans+=c[i]; c.erase(c.begin()+i); break; } } int l=1; while (l<n) { for (auto i: c) { if (press(ans+i)>l) { ans+=i; l++; } } } return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:13: error: 'press' was not declared in this scope
    8 |         if (press(c[i])) {
      |             ^~~~~
combo.cpp:17:17: error: 'press' was not declared in this scope
   17 |             if (press(ans+i)>l) {
      |                 ^~~~~