제출 #75022

#제출 시각아이디문제언어결과실행 시간메모리
75022faustaadp콤보 (IOI18_combo)C++17
100 / 100
57 ms492 KiB
#include "combo.h" #include<bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; char isi[4]={'A','B','X','Y'}; ll i,aw; string s; std::string guess_sequence(int N) { aw=3; if(press("AABB")) { if(press("AA")) aw=0; else aw=1; } else { if(press("XX")) aw=2; else aw=3; } s=isi[aw]; swap(isi[aw],isi[3]); for(i=1;i<N-1;i++) { ll tem=press(s+isi[0]+isi[0]+s+isi[0]+isi[1]+s+isi[0]+isi[2]+s+isi[1]); if(tem==i) s+=isi[2]; else if(tem==i+1) s+=isi[1]; else s+=isi[0]; } if(N>1) { if(press(s+isi[0])==N) s+=isi[0]; else if(press(s+isi[1])==N) s+=isi[1]; else s+=isi[2]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...