# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
534393 | YaserFaisal | 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>
#include "combo.h"
using namespace std;
string guess_sequence (int n)
{
string cur = ""
while(cur.size()<n)
{
if ( press(cur+'A') == cur.size()+1 )
{
cur+='A' ;
continue ;
}
if ( press(cur+'B') == cur.size()+1 )
{
cur+='B' ;
continue ;
}
if ( press(cur+'X') == cur.size()+1 )
{
cur+='X' ;
continue ;
}
if ( press(cur+'Y') == cur.size()+1 )
{
cur+='Y' ;
continue ;
}
}
return cur ;
}