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