Submission #144644

#TimeUsernameProblemLanguageResultExecution timeMemory
144644aanjiCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
string guess_sequence(int N) { string s; char a='A', b='B', c='X'; if(press("AB")) { if(press("A")) { s="A"; a='Y'; } else { b='Y'; s="B"; } } else { if(press("X")) { c='Y'; s="X"; } else s="Y"; } while(s.size()<N-1) { int k=press(s+a+s+b+a+s+b+b+s+b+c); if(k==s.size()) s+=c; else if(k==s.size()+1) s+=a; else s+=b; } if(press(s+a)==s.size()+1) return s+a; if(press(s+b)==s.size()+1) return s+b; return s+c; }

Compilation message (stderr)

combo.cpp:1:1: error: 'string' does not name a type
    1 | string guess_sequence(int N)
      | ^~~~~~