이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
std::string guess_sequence(int N) {
string s;
vector<string>h={"A","B","X","Y"};
if(press(h[0]+h[1])){
if(press(h[1]))swap(h[0],h[1]);
}
else if(press(h[2])){
swap(h[0],h[2]);
}
else{
swap(h[0],h[3]);
}
s+=h[0];
int k=1;
for(int i=2;i<N;i++){
string tmp=s+h[1]+s+h[2]+h[1]+s+h[2]+h[2]+s+h[2]+h[3];
int t=press(tmp);
if(t==k+1){
s+=h[1];
}
else if(t==k+2){
s+=h[2];
}
else{
s+=h[3];
}
k++;
}
if(press(s+h[1])==k+1){
s+=h[1];
}
else if(press(s+h[2])==k+1){
s+=h[2];
}
else{
s+=h[3];
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |