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;
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define pb push_back
#define sz(x) (int)(x.size())
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define vi vector<int>
#define vp vector<pii>
#define vvi vector<vi>
#define ykh mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count())
#define __lg(x) 63-__builtin_clzll(x)
#define pow2(x) (1LL<<x)
string guess_sequence(int n){
string s;
vector<char>v={'A','B','X','Y'};
for(int j=0;j<4;j++){
for(int i=0;i<n;i++){
if(j==0)s+=v[j];
else s[i]=v[j];
}
int x=press(s);
if(x==1){
break;
}
}
for(int i=1;i<n;i++){
for(int j=0;j<4;j++){
s[i]=v[j];
int x=press(s);
if(x==i+1){
break;
}
}
}
return s;
}
/*
input:
*/
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |