이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
int n;
string bruteforce(int empl, string act) {
if (empl==n)
{
if (press(act)==n) return act;
return "*";
}
empl++;
string a=bruteforce(empl, act+"A");
if (a!="*") return a;
string b=bruteforce(empl, act+"B");
if (b!="*") return b;
string x=bruteforce(empl, act+"X");
if (x!="*") return x;
string y=bruteforce(empl, act+"Y");
if (y!="*") return y;
return "*";
}
string guess_sequence(int temp) {
n=temp;
return bruteforce(0, "");
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |