#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
string p , buttons = "ABXY";
string ans = "";
int coins = 0;
while(coins != N){
for(int i = 0 ; i < buttons.size() ;i++){
p = ans;
p += buttons[i];
if(p.size() > 1 and buttons[i] == p[0]) continue;
coins = press(p);
if(coins == p.size()){
ans = p;
break;
}
else if(i == 2) {
ans += buttons[3];
break;
}
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |