제출 #95714

#제출 시각아이디문제언어결과실행 시간메모리
95714jeff콤보 (IOI18_combo)C++14
5 / 100
4 ms276 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; int press(string); string guess_sequence(int N) { int r, i; string c, s; if (press("AB")) { if (press("A")) c = "ABXY"; else c = "BXYA"; } else { if (press("X")) c = "XYAB"; else c = "YABX"; } s = c[0]; for (i = 1; i < N - 1; ++i) { r = press(s + c[1] + c[1] + s + c[1] + c[2] + s + c[1] + c[3] + s + c[2]) - i; if (r == 2) s += c[1]; else if (r == 1) s += c[2]; else s += c[3]; } if (press(s + "A" + s + "B") == N) { if (press(s + "A") == N) s += "A"; else s += "B"; } else { if (press(s + "X") == N) s += "X"; else s += "Y"; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...