제출 #908735

#제출 시각아이디문제언어결과실행 시간메모리
908735Aiperiii콤보 (IOI18_combo)C++14
컴파일 에러
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;
}

컴파일 시 표준 에러 (stderr) 메시지

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