# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
90993 |
2018-12-25T12:31:38 Z |
too_stupid |
Combo (IOI18_combo) |
C++14 |
|
1 ms |
200 KB |
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int n) {
string p = "";
string k = "XYZ";
if(press("A"))
{
p+="A";
for(int i = 1 ; i < 4 * n ; i++)
{
for(int j = 0 ; j < 3 ; ++j)
{
if(press(p + k[j]) == (int)p.size() + 1)
{
p+=k[j];
break;
}
}
}
}
else if(press("B"))
{
p+="B";
for(int i = 1 ; i < 4 * n ; i++)
{
for(int j = 0 ; j < 3 ; ++j)
{
if(press(p + k[j]) == (int)p.size() + 1)
{
p+=k[j];
break;
}
}
}
}
else if(press("X"))
{
p+="X";
for(int i = 1 ; i < 4 * n ; i++)
{
for(int j = 0 ; j < 3 ; ++j)
{
if(press(p + k[j]) == (int)p.size() + 1)
{
p+=k[j];
break;
}
}
}
}
else
{
p+="Y";
for(int i = 1 ; i < 4 * n ; i++)
{
for(int j = 0 ; j < 3 ; ++j)
{
if(press(p + k[j]) == (int)p.size() + 1)
{
p+=k[j];
break;
}
}
}
}
return p;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
200 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
200 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |