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 ll long long
#define ull unsigned ll
#define pb push_back
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;
string guess_sequence(int N){
string chars[] = {"A", "B", "X", "Y"};
bool used[4]; for (int i = 0; i < 4; i++) used[i] = false;
string out;
for (int i = 0; i < 4; i++){
int num = press(chars[i]);
if (num){
out+=chars[i];
used[i] = true;
break;
}
}
for (int i = 1; i < N; i++){
for (int j = 0; j < 4; i++){
if (used[j]) continue;
int num = press(out+chars[j]);
if (num > i){
out+=chars[i];
break;
}
}
}
return out;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |