Submission #1191842

#TimeUsernameProblemLanguageResultExecution timeMemory
1191842p4r4d0_xCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int N) { vector<char> a = {'A', 'B', 'X', 'Y'}; string s = ""; for(int i = 0; i < 4; ++i){ s += a[i]; if(press(s) == 1){ break; } else s = ""; } string st = ""; for(int i = 0; i < 4; ++i){ st = s; st += a[i]; if(press(st) == 2){ s = st; break; } } for(int i = 0; i < 4; ++i){ st = s; st += a[i]; if(press(st) == 3){ s = st; break; } } return S; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:32:10: error: 'S' was not declared in this scope
   32 |   return S;
      |          ^