# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
501332 | shantol | 콤보 (IOI18_combo) | C++14 | 1 ms | 200 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int N){
string a;
char x,y,z;
for(int i=0;i<N;i++){
if(i==0){
if(press("AB")){
if(press("A")){
a="A";
x='B';
y='X';
z='Y';
}
else {
a="B";
x='A';
y='X';
z='Y';
}
}
else if(press("X")){
a="X";
x='B';
y='A';
z='Y';
}
else {
a="Y";
x='B';
y='X';
z='A';
}
}
else if(i==N-1){
if(press(a+x)){a+=x;}
else if(press(a+y)){a+=y;}
else {a+=z;}
}
else{
int p=press(a+x+x+a+x+y+a+x+z+a+y);
if(p==2){a+=x;}
else if(p==1){a+=y;}
else {a+=z;}
}
}
return a;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |