제출 #686463

#제출 시각아이디문제언어결과실행 시간메모리
686463acceptify콤보 (IOI18_combo)C++17
5 / 100
1 ms304 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { int ret = press("AB"); string res, a, b, c; if (ret) { if (press("A")) res = "A", a = "B", b = "X", c = "Y"; else res = "B", a = "A", b = "X", c = "Y"; } else { if (press("X")) res = "X", a = "A", b = "B", c = "Y"; else res = "Y", a = "A", b = "B", c = "X"; } for (int i = 2; i < N; i++) { ret = press(res + a + a + res + a + b + res + a + c + res + b); if (ret == i + 1) res += a; else if (ret == i) res += b; else res += c; } if (press(res + a) == N) res += a; else if (press(res + b) == N) res += b; else res += c; return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...