Submission #469914

#TimeUsernameProblemLanguageResultExecution timeMemory
469914IvnFCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h" #include <bits/stdc++.h> string guess_sequence(int n){ string ans="", s="", x; x="A"; int nilai=press(x); if(nilai==1){ ans=x; } x="B" nilai=press(x); if(nilai==1) ans=x; x="X"; nilai=press(x); if(nilai==1) ans=x; x="Y"; if(ans=="") ans=x; for(int i=1;i<n;++i){ string tmp=ans; tmp+="X"; nilai=press(x); if(nilai==(i+1)){ ans=tmp; continue; } tmp=ans; tmp+="Y"; nilai=press(x); if(nilai==(i+1)){ ans=tmp; continue; } tmp=ans; tmp+="A"; nilai=press(x); if(nilai==(i+1)){ ans=tmp; continue; } tmp=ans; tmp+="B"; ans=tmp; continue; } return ans; }

Compilation message (stderr)

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