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 <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include "combo.h"
using namespace std;
using namespace __gnu_pbds;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> dl;
typedef vector<ii> vii;
typedef vector<dl> vdll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=1e9+7;
const int N=100005;
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
//#define int ll
#define endl '\n'
char ch[4]={'A','B','X','Y'};
string guess_sequence(int n){
string x;
string tmp;
for(int i=0;i<4;i++)
{
x+=ch[i];
if(press(x)==1)
{
tmp+=x;
break;
}
x.clear();
}
for(int i=1;i<n;i++)
{
for(int j=0;j<4;j++)
{
if(ch[j]!=x[0])
{
string z=tmp;
tmp+=ch[j];
if(press(z)==i+1)
{
tmp+=ch[j];
break;
}
}
}
}
return tmp;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |