제출 #433840

#제출 시각아이디문제언어결과실행 시간메모리
433840frodakcin콤보 (IOI18_combo)C++11
0 / 100
2 ms200 KiB
#include "combo.h" #include <cstdio> char btn[]="ABXY"; std::string guess_sequence(int N) { std::string p = ""; int first=0; first |= press("BY"); first |= press("XY")<<1; std::string poss=""; for(int i=0;i<4;++i) if(i!=first) poss.push_back(btn[i]); std::string S = ""; S += btn[first]; for(int i=1;i+1<N;++i) { p=""; p += (S+poss[1]); p += (S+poss[2]+poss[0]); p += (S+poss[2]+poss[1]); p += (S+poss[2]+poss[2]); S += poss[press(p)-i]; } int last=0; for(;last<2;++last) if(press(S+poss[last])==N) break; S += poss[last]; return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...