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 <bits/stdc++.h>
#include "combo.h"
#define N 100009
#define pii pair <int, int>
#define ff first
#define sz() size()
#define ss second
#define pb push_back
#define ll long long
using namespace std;
char c[5]={'X', 'Y', 'A', 'B'};
string guess_sequence(int n){
string s;
s+='X';
int in=-1;
for(int i=0; i<3; i++){
s[0]=c[i];
int x=press(s);
if(x){
in=i;
break;
}
}
if(in<0)
in=3;
s[0]=c[in];
swap(c[in], c[3]);
for(int i=1; i<n; i++){
s+='X';
in=0;
for(int j=0; j<2; j++){
s[i]=c[j];
int x=press(s);
if(x==i){
in=1;
break;
}
}
if(!in)
s[i]=c[2];
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |