제출 #1317898

#제출 시각아이디문제언어결과실행 시간메모리
1317898shangbinCombo (IOI18_combo)C++20
0 / 100
0 ms400 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N){ vector<string> b = {"A", "B", "X", "Y"}; string p, S = ""; int first; if (press("XY") == 1){ if (press("X") == 1) first = 2; else first = 3; } else { if (press("A") == 1) first = 0; else first = 1; } S += b[first]; b.erase(b.begin() + first); for (int i = 1; i < N-1; i++){ p = (S + b[1]) + (S + b[2] + b[0]) + (S + b[2] + b[1]) + (S + b[2] + b[2]); int coin = press(p); S += b[coin - S.length()]; } for (auto bi : b) if (press(S + bi) == N){ S += bi; break; } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...