이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
const int mxN = 2005;
string guess_sequence(int n) {
string p = "", comb;
if(press("A") == 1)
p = "A", comb = "BXY";
else if(press("B") == 1)
p = "B", comb = "AXY";
else if(press("X") == 1)
p = "X", comb = "ABY";
else
p = "Y", comb = "ABX";
while((int) p.length() < n) {
for(int i = 0; i < 3; i++) {
if(press(p+comb[i]) == (int) p.length()+1) {
p += comb[i];
break;
}
}
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |