제출 #1279283

#제출 시각아이디문제언어결과실행 시간메모리
1279283tull콤보 (IOI18_combo)C++20
10 / 100
16 ms444 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { int p=0,r; char c[]={'A','B','X','Y'}; char sk; string a=""; for(auto&e:c){ r=press(a+e); if(r>p){ ++p; a+=e; sk=e; break; } } while (p<N) { for(int i=0;i<4;++i){ char e=c[i]; if(e==sk)continue; if(i!=3)r=press(a+e); else r=p+1; if(r>p){ ++p; a+=e; break; } } } return a; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...