# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1142139 | alilou | 콤보 (IOI18_combo) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int n){
const int m=4;
string buttons="ABXY";
string s="";
for(int i ; i<n ; i++){
for(int j ; i<m-1 ; i++){
int lenght=press(s+buttons[j]);
if (lenght==i+1){
s+=buttons[j];
break;
}
if (s.size()!=i+1)s+=buttons[m-1];
}
s+=buttons[m-1];
}
return s;
}
int main(){
int n;
cin>>n;
guess_sequence(n);
return 0;
}