# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
232237 | celeste | Combo (IOI18_combo) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "combo.h"
#include <iostream>
using namespace std;
std::string guess_sequence(int N) {
string p,s = "";
if (press("A")==1)s += "A";
elseif (press("B")==1)s += "B";
elseif (press("X")==1)s += "X";
elseif (press("Y")==1)s += "Y";
if (press(s+"A")==2)s += "A";
elseif (press("B")==2)s += "B";
elseif (press("X")==2)s += "X";
elseif (press("Y")==2)s += "Y";
if (press(s+"A")==3)s += "A";
elseif (press("B")==3)s += "B";
elseif (press("X")==3)s += "X";
elseif (press("Y")==3)s += "Y";
return s;
}