# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
152677 | Segtree | 콤보 (IOI18_combo) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
#define mod 1000000007
string guess_sequence(int N){
string d="ABXY";
string s="Y";
for(int r=0;r<3;r++){
string p=""; p+=d[r];
if(press(p)==1)s=p;
}
char fi=s[0];
for(int i=2;i<=N;i++){
char res='#',rem;
ll cnt=0;
for(int r=0;r<4;r++){
if(d[r]==fi)continue;
cnt++;
if(cnt==3){
rem=d[r];
break;
}
string p=s; p+=d[r];
if(press(p)==i)res=d[r];
}
if(res=='#')res=rem;
s+=res;
}
return s;
};
/*
int main(){
return 0;
}*/