제출 #523130

#제출 시각아이디문제언어결과실행 시간메모리
523130tmn2005콤보 (IOI18_combo)C++17
30 / 100
48 ms432 KiB
#include "combo.h" #ifndef EVAL #include "grader.cpp" #endif std::string guess_sequence(int N) { std::string p = ""; if(press("A")){ p += 'A'; for(int i=1; i<N; i++){ if(press(p+'B') == i+1){ p += 'B'; } else if(press(p+'X') == i+1){ p += 'X'; } else{ p += 'Y'; } } } else if(press("B")){ p += 'B'; for(int i=1; i<N; i++){ if(press(p+'A') == i+1){ p += 'A'; } else if(press(p+'X') == i+1){ p += 'X'; } else{ p += 'Y'; } } } else if(press("X")){ p += 'X'; for(int i=1; i<N; i++){ if(press(p+'B') == i+1){ p += 'B'; } else if(press(p+'A') == i+1){ p += 'A'; } else{ p += 'Y'; } } } else{ p += 'Y'; for(int i=1; i<N; i++){ if(press(p+'B') == i+1){ p += 'B'; } else if(press(p+'X') == i+1){ p += 'X'; } else{ p += 'A'; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...