# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
232245 | pere_gil | Combo (IOI18_combo) | C++14 | 1 ms | 200 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;
string guess_sequence(int N){
string s="";
string re;
if(press("A")==1){
s+="A";
re="BXY";
}
else{
if(press("B")==1){
s+="B";
re="AXY";
}
else{
if(press("X")==1){
s+="X";
re="ABY";
}
else{
s+="Y";
re="ABX";
}
}
}
bool ja;
for(int i=0;i<N;i++){
if(press(s+re[0])>0){
s+=re[0];
ja=false;
}
else{
if(press(s+re[1])>0){
s+=re[1];
}
else{
s+=re[2];
}
}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |