Submission #596390

#TimeUsernameProblemLanguageResultExecution timeMemory
596390BelphegorCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; string S = "ABXY"; string guess_sequence(int n){ string ans; int score = 0; ans.push_back('A'); for(int i=0; S[i]; i++){ ans.back() = S[i]; int w = press(ans); if(w>score){ score = w; break; } } for(int i=1; i<n; i++){ ans.push_back('A'); for(int j=0; S[j]; j++){ if(S[j]==S[0]) continue; ans.back() = S[j]; int w = press(ans); if(w>score){ score = w; break; } } } return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:11: error: 'press' was not declared in this scope
   11 |   int w = press(ans);
      |           ^~~~~
combo.cpp:22:12: error: 'press' was not declared in this scope
   22 |    int w = press(ans);
      |            ^~~~~