제출 #772129

#제출 시각아이디문제언어결과실행 시간메모리
772129Alfraganus콤보 (IOI18_combo)C++14
10 / 100
41 ms460 KiB
#include "combo.h" using namespace std; string guess_sequence(int n) { string s; if(press("A") == 1)s = "A"; else if(press("B") == 1)s = "B"; else if(press("X") == 1)s = "X"; else s = "Y"; char dx[3] = {'A', 'B', 'X'}; for(int i = 1; i < n; i ++){ for(int j = 0; j < 4; j ++){ if(j == 3){ s += 'Y'; } else if(dx[j] != s[0]){ if(press(s + dx[j]) == i + 1){ s += dx[j]; break; } } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...