제출 #414862

#제출 시각아이디문제언어결과실행 시간메모리
414862Mohammed_Atalah콤보 (IOI18_combo)C++17
10 / 100
91 ms560 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { char cs[4] = {'A', 'B', 'X', 'Y'}; string res = ""; for (int i = 0; i < 4; i++) { string s = ""; s += cs[i]; s += cs[i]; if (press(s) == 1) { res += cs[i]; cs[i] = cs[3]; break; } } if (N == 1) { return res; } for (int i = 1; i < N; i++) { for (int e = 0; e < 3; e++) { string check = res; check += cs[e]; if (press(check) == i + 1) { res += cs[e]; break; } } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...