Submission #623106

#TimeUsernameProblemLanguageResultExecution timeMemory
623106l_rehoCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { // guess del primo carattere string guess = "A"; vector<string> voc{"A", "B", "X", "Y"}; for(int i = 0; i < 4; i++){ int ret = press(voc[i]); if(ret == 1){ guess = voc[i]; break; } } for(int i = 1; i < N; i++){ for(int j = 0; j < 4; j++){ if(voc[j][0] == guess[0]) continue; int ret = press(guess + voc[j]); if(ret == (int)guess.length()+1){ guess += voc[j]; break; } } } return guess; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:13: error: 'press' was not declared in this scope
   11 |   int ret = press(voc[i]);
      |             ^~~~~
combo.cpp:22:14: error: 'press' was not declared in this scope
   22 |    int ret = press(guess + voc[j]);
      |              ^~~~~