Submission #1045483

#TimeUsernameProblemLanguageResultExecution timeMemory
1045483SiliconSquaredSeats (IOI18_seats)C++14
Compilation error
0 ms0 KiB
#include "combo.h"
using namespace std;

std::string guess_sequence(int n) {
    string z;
    int x;
    string a,b,c,d;
    if (press("AB")>0){
        if (press("A")==1){
            a="A";b="B";
        }else{
            a="B";b="A";
        }
        c="X";d="Y";
    }else{
        if (press("X")==1){
            a="X";b="Y";
        }else{
            a="Y";b="X";
        }
        c="A";d="B";
    }
    z=a;
    while (z.length()<n-1){
        x=press(z+b+z+c+b+z+c+c+z+c+d);
        if (x==z.length()){
            z+=d;
        }else if (x==z.length()+1){
            z+=b;
        }else{
            z+=c;
        }
    }
    if (press(z+b)==n){
        return z+b;
    }else if (press(z+c)==n){
        return z+c;
    }else{
        return z+d;
    }
}

Compilation message (stderr)

seats.cpp:1:10: fatal error: combo.h: No such file or directory
    1 | #include "combo.h"
      |          ^~~~~~~~~
compilation terminated.