# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
380106 | Dan4Life | 콤보 (IOI18_combo) | C++17 | 2 ms | 256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int N) {
string p = "", x = "ABXY";
for(int i = 0; i < 3; i++)
{
p = x[i];
int first = press(p);
if(first==1){
x.erase(x.begin()+i);
break;
}
}
if(x.size()==4)p+="Y", x.erase(prev(x.end()));
string S = p;
for(int i = 1; i < N; i++)
{
bool got_next = false;
for(int j = 0; j < 2; j++){
int next = press(p+x[j]);
if(next==p.size()+1){
p+=x[j]; got_next =true; break;
}
}
if(!got_next)p+=x[2];
}
S=p;
return S;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |