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<algorithm>
std::string guess_sequence(int N){
std::string s, p, c = {"ABXY"};
int i,j;
for(i=0;i<3;i++){
if(press(s+c[i]) == 1) break;
}
s += c[i];
std::swap(c[3],c[i]);
int coin = 1;
for(i=1;i<N;i++){
for(j=0;j<2;j++){
if(press(s+c[j]) == coin+1) break;
}
s+=c[j];
coin++;
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |