Submission #232253

#TimeUsernameProblemLanguageResultExecution timeMemory
232253pere_gilCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include "combo.h" using namespace std; string guess_sequence(int N) { string s; string re; if(press("A")>0){ s="A"; re="BXY"; } else{ if(press("B")>0){ s+="B"; re="AXY"; } else{ if(press("X")>0){ s="X"; re="ABY"; } else{ s="Y"; re="ABX"; } } } for(int i=1;i<=N;i++){ if(press(s+re[0])>0){ s+=re[0]; ja=false; } else{ if(press(s+re[1])>0){ s+=re[1]; } else{ s+=re[2]; } } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:33:13: error: 'ja' was not declared in this scope
   33 |             ja=false;
      |             ^~