# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
477950 | omohamadooo | Combo (IOI18_combo) | C++14 | 0 ms | 0 KiB |
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>
#define ll long long
#define pb push_back
#define endl '\n'
#define pii pair<ll,ll >
#define F first
#define S second
#define ld long double
using namespace std;
using namespace __gnu_pbds;
typedef tree<ll , null_type , less_equal<ll> ,rb_tree_tag ,tree_order_statistics_node_update >ordered_set;
const int MOD=1e9+7;
const int N=3e5+7;
long long po(ll x,ll y)
{
ll ans=1;
while(y){
if(y & 1) ans=(ans*x);//%MOD;
y/=2;
x=(x*x);//%MOD;
}
return ans;
}
string guess_sequence(int n)
{
string s;
int no=-1;
char a[4]={'a','b','x','y'};
for(ll i=1;i<=n;i++){
bool f=0;
for(ll j=0;j<3;j++){
if(j==no) continue;
if(prees(s+a[j]) == i){
f=1;
if(i==1) no=j;
s+=a[j];
break;
}
}
if(!f) s+=a[3];
}
return s;
}
void solve()
{
cout<<guess_sequence(6);
}
/*
int main()
{
// ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
//freopen(".in","r",stdin);freopen("timeline.out","w",stdout);
int t=1;
//cin>>t;
while(t--) solve();
return 0;
}
*/