이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
string p,t="ABXY",x;
int a,b,c,i,j,k,d,e,f,g,h;
string guess_sequence(int N){
e=0;
for(i=0;i<3;i++){
p="";
p+=t[i];
d=press(p);
if(d==1){
t.erase(t.begin()+i);
e=1;
break;
}
}
if(e==0){
p="";
p+=t[3];
t.erase(t.begin()+3);
}
e=0;
for(i=2;i<=N;i++){
x=p;
e=0;
for(j=0;j<2;j++){
p=x+t[j];
d=press(p);
if(d==i){
e=1;
break;
}
}
if(e==0){
p=x+t[2];
}
}
return p;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |