제출 #949157

#제출 시각아이디문제언어결과실행 시간메모리
949157SoSmolSten콤보 (IOI18_combo)C++17
5 / 100
1 ms344 KiB
#include "combo.h" using namespace std; string c = "ABXY"; string guess_sequence(int N) { string res = ""; int id = 0; if (press("AB") >= 1) id = press("A") != 1; else id = 2 + (press("X") < 1); res += c[id]; swap(c[3], c[id]); for(int i = 1; i < N - 1; ++i){ int v = press(res + c[0] + c[0] + res + c[0] + c[1] + res + c[0] + c[2] + res + c[1]); if(v == i + 2) { res += c[0]; }else if(v == i + 1){ res += c[1]; }else res += c[2]; } if(press(res + c[0]) == N) res += c[0]; else if(press(res + c[1]) == N) res += c[1]; else res += c[2]; return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...