Submission #772124

#TimeUsernameProblemLanguageResultExecution timeMemory
772124AlfraganusCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h" string guess_sequence(int n) { string s; if(press("A") == 1)s = "A"; else if(press("B") == 1)s = "B"; else if(press("X") == 1)s = "X"; else s = "Y"; char dx[4] = {'A', 'B', 'X', 'Y'}; for(int i = 1; i < n; i ++){ for(int j = 0; j < 4; j ++){ if(dx[j] != s[0]){ if(press(s + dx[j]) == i + 1){ s += dx[j]; break; } } } } return s; }

Compilation message (stderr)

combo.cpp:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string guess_sequence(int n)
      | ^~~~~~
      | stdin