제출 #600538

#제출 시각아이디문제언어결과실행 시간메모리
600538Shithila콤보 (IOI18_combo)C++14
0 / 100
1 ms208 KiB
#include "combo.h" using namespace std; std::string guess_sequence(int N) { string p = ""; string ans; char add[4]={'A','B','X','Y'}; int firstindex=0; int len=0; for(int i=0;i<4;i++) { ans=p+add[i]; len=len+press(ans); if(len==1) { firstindex=i; p=p+add[i]; break; } } for(int j=1;j<N;j++) { for(int i=0;i<4;i++) { if(i==firstindex) { continue; } ans=p+add[i]; len=len+press(ans); if(len==j+1) { firstindex=i; p=p+add[i]; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...