# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1020993 | Solikha | Combo (IOI18_combo) | C++17 | 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;
string guess_sequence(int N) {
string s = "", t = "ABXY", tmp = "";
for(int i = 0; i < 4; i++){
if(press(s + t[i]) == 1){
s += t[i];
}
}
for(int i = 0; i < 4; i++){
if (t[i] != s[0]) tmp += t[i];
}
while(press(s) != N){
for(int i = 0; i < 3; i++){
if(press(s + tmp[i]) == s.size() + 1){
s += tmp[i]; break;
}
}
}
return s;
}