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;
string guess_sequence(int n){
vector<char> a={'A','B','X','Y'};
string s="";
int i,j;
for(i=1;i<=n;i++){
for(j=0;j<4;j++){
s.push_back(a[j]);
if(press(s)==i)
break;
s.pop_back();
}
if(i==1){
for(j=0;j<4;j++){
if(a[j]==s[i-1]){
swap(a[j],a[3]);
a.pop_back();
break;
}
}
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |