Submission #908735

#TimeUsernameProblemLanguageResultExecution timeMemory
908735Aiperiii콤보 (IOI18_combo)C++14
Compilation error
0 ms0 KiB
string guess_sequence(int N) {
    string s="";
    string x="";
    x=s;
    x+='A';x+=s;x+='B';
    int res1=press(x);
    if(res1==1){
        x=s;x+='A';
        if(press(x)==1)s+='A';
        else s+='B';
    }
    else{
        x=s;x+='X';
        if(press(x)==1)s+='X';
        else s+='Y';
    }
    for(int j=1;j<N;j++){
        x=s;
        x+='A';x+=s;x+='B';
        int res1=press(x);
        if(res1==j+1){
            x=s;x+='A';
            if(press(x)==j+1)s+='A';
            else s+='B';
        }
        else{
            x=s;x+='X';
            if(press(x)==j+1)s+='X';
            else s+='Y';
        }
    }
    return s;
}

Compilation message (stderr)

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