# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
870919 | _unknown_2010 | Combo (IOI18_combo) | C++17 | 1 ms | 544 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<bits/stdc++.h>
using namespace std;
int st,sti=1;
string t="ABXY";
string guess_sequence(int N) {
string p = "AB";
if(press(p)){
p="A";
if(press(p))p="A",st=0;
else p="B",st=1;
}
else{
p="X";
if(press(p))p="X",st=2;
else p="Y",st=3;
}
for(int i=1; i<N-1; i++){
string q="";
int x=0;
if(x==st)x++;
for(int j=0; j<4; j++){
if(st==j)continue;
q+=p+t[x]+t[j];
}
x++;
if(x==st)x++;
q+=p+t[x];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |