# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
500052 | LucaIlie | 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 <iostream>
#include "combo.h"
using namespace std;
string guess_sequence( int n ) {
int i;
string ans;
for ( i = 1; i <= n; i++ ) {
if ( (i > 1 && ch[0] != 'A') && press( ans + 'A' ) == i )
ans += 'A';
else if ( (i > 1 && ch[1] != 'B') && press( ans + 'B' ) == i )
ans += 'B';
else if ( (i > 1 && ch[2] != 'X') && press( ans + 'X' ) == i )
ans += 'X';
else
ans += 'Y';
}
return ans;
}