Submission #143554

#TimeUsernameProblemLanguageResultExecution timeMemory
143554mat_vCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "shoes.h"
using namespace std;

string guess_sequence(int N) {
    string a = "A";
    string b = "B";
    string x = "X";
    int prvi = press(a);
    int drug = press(b);
    int trec = press(x);
    string tren;
    if(prvi)tren = "A";
    else if(drug)tren = "B";
    else if(trec)tren = "X";
    else tren = "Y";
    string d,t,c;
    if(tren == "A"){
        d = "X";
        t = "Y";
        c = "B";
    }
    else if(tren == "B"){
        d = 'X';
        t = 'Y';
        c = 'A';
    }
    else if(tren == "X"){
        d = 'A';
        t = 'Y';
        c = 'B';
    }
    else if(tren == "Y"){
        d = 'X';
        t = 'A';
        c = 'B';
    }

    for(int i=1; i<N; i++){
        if(i == N-1){
            string frs = tren;
            frs += d;
            string frs2 = tren;
            frs2 += t;
            int sta = press(frs);
            int sta2 = press(frs2);
            if(sta > sta2)tren += d;
            else if(sta2 > sta)tren += t;
            else tren += c;
            continue;
        }
        string frs = tren;
        frs += d;
        string sek1 = tren,sek2 = tren,sek3 = tren;
        string pom1 = t;
        pom1 += t;
        string pom2 = t;
        pom2 += d;
        string pom3 = t;
        pom3 += c;
        sek1 += pom1;
        sek2 += pom2;
        sek3 += pom3;
        frs += sek1;
        frs += sek2;
        frs += sek3;
        int sta = press(frs);
        if(sta == tren.size())tren += c;
        else if(sta == tren.size() + 1)tren += d;
        else tren += t;

    }
    cout << tren << endl;
    return tren;
}

Compilation message (stderr)

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