Submission #960980

#TimeUsernameProblemLanguageResultExecution timeMemory
960980aminjon__Combo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
string guess_sequence(int N){ string ans; if(press("AB") > 0){ if(press("A") > 0){ ans = "A"; button.erase(button.begin()); } else{ ans = "B"; button.erase(button.begin()+1); } } else{ if(press("X") > 0){ ans = "X"; button.erase(button.begin()+2); } else{ ans = "Y"; button.erase(button.begin()+3); } } for(int i = 2;i <= N-1;i++){ int r = press(ans+button[1] + ans+button[2]+button[0]+ans+button[2]+button[1]+ans+button[2]+button[2] ); ans += button[r - ans.size()]; } if(press(ans+button[0]+ans+button[1]) > ans.size()){ if(press(ans+button[0]) > ans.size()){ ans += button[0]; } else{ ans += button[1]; } } else{ ans += button[2]; } return ans; }

Compilation message (stderr)

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