이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
string s;
string ans;
auto first_subtask = [&](int n){
string cur = "ABXY";
for (int i = 0;i<4;++i){
string t;
t+=cur[i];
if (press(t) == 1){
for (int j = 0;j<4;++j){
if (i != j){
s+=cur[j];
}
}
ans = t;
break;
}
}
for (int i = 0;i<3;++i){
for (int j = 0;j<3;++j){
string temp = ans;
temp+=s[i];
temp+=s[j];
//cout<<temp<<'\n';
if (press(temp) == 3){
ans = temp;
return ans;
}
}
}
return ans;
};
string v = first_subtask(N);
//cout<<v<<'\n';
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |