# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
741824 | haydendoo | 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 ans;
for(int i=0; i<n; ++i) {
if(press(ans+'A')==i+1) {
ans.push_back('A');
}
else if(press(ans+'B')==i+1) {
ans.push_back('B');
}
else if(press(ans+'X')==i+1) {
ans.push_back('X');
}
else {
ans.push_back('Y');
}
}
return ans;
}