# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1126315 | Aliyyiakbar | Combo (IOI18_combo) | C++17 | 1 ms | 408 KiB |
#include "bits/stdc++.h"
#include "combo.h"
using namespace std;
string guess_sequence(int N)
{
string res = "";
if (press("A"))
{
res += "A";
}
else if (press("B"))
{
res += "B";
}
else if (press("X"))
{
res += "X";
}
else
{
res += "Y";
}
if (press(res+"A") == 2)
{
res += "A";
}
else if (press(res+"B") == 2)
{
res += "B";
}
else if (press(res+"X") == 2)
{
res += "X";
}
else
{
res += "Y";
}
if (press(res+"A") == 3)
{
res += "A";
return res;
}
if (press(res + "B") == 3)
{
res += "B";
return res;
}
if (press(res + "X") == 3)
{
res += "X";
return res;
}
if (press(res + "Y") == 3)
{
res += "Y";
return res;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |