Submission #1114531

#TimeUsernameProblemLanguageResultExecution timeMemory
1114531lftroqCombo (IOI18_combo)C++14
10 / 100
121 ms1452 KiB
#include "combo.h"

using namespace std;

string guess_sequence(int N) {
    string p="",s="";
    for(int i=1;i<=N;i++)
    {
        p.push_back('A');
        if(press(p)==i)
        {
            s.push_back('A');
            continue;
        }
        p.pop_back();
        p.push_back('B');
        if(press(p)==i)
        {
            s.push_back('B');
            continue;
        }
        p.pop_back();
        p.push_back('X');
        if(press(p)==i)
        {
            s.push_back('X');
            continue;
        }
        p.pop_back();
        p.push_back('Y');
        s.push_back('Y');
    }
    return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...