Submission #1020993

#TimeUsernameProblemLanguageResultExecution timeMemory
1020993SolikhaCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string s = "", t = "ABXY", tmp = ""; for(int i = 0; i < 4; i++){ if(press(s + t[i]) == 1){ s += t[i]; } } for(int i = 0; i < 4; i++){ if (t[i] != s[0]) tmp += t[i]; } while(press(s) != N){ for(int i = 0; i < 3; i++){ if(press(s + tmp[i]) == s.size() + 1){ s += tmp[i]; break; } } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:8: error: 'press' was not declared in this scope
   10 |     if(press(s + t[i]) == 1){
      |        ^~~~~
combo.cpp:17:9: error: 'press' was not declared in this scope
   17 |   while(press(s) != N){
      |         ^~~~~