Submission #216484

#TimeUsernameProblemLanguageResultExecution timeMemory
216484T0p_Combo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s = ""; //first letter int ab = press("AB"); if(ab == 0) { if(press("X")) s += 'X'; else s += 'Y'; } else { if(press("A")) s += 'A'; else s += 'B'; } for(int i=2 ; i<=n ; i++) { string test = "": test += s; test += "XX"; test += s; test += "XY"; test += s; test += "XZ"; test += s; test += "Y"; test += s[0]; int ret = press(test); if(ret == 0) s += 'Z'; else if(ret == 1) s += 'Y'; else s += 'X'; } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:23:19: error: expected ',' or ';' before ':' token
   23 |   string test = "":
      |                   ^