# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1023224 | LolkasMeep | 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>
using namespace std;
// int press(string s);
string guess_sequence(int N){
string s = "";
string chrs = "ABXY";
for(int n = 1; n <= N; n++){
for(int i = 0; i < 4; i++){
if(n > 1 && s[0] == chrs[i]) continue;
if(press(s + chrs[i]) == n){
s += chrs[i];
break;
}
}
}
return chrs;
}