제출 #154311

#제출 시각아이디문제언어결과실행 시간메모리
154311andreiomd콤보 (IOI18_combo)C++11
0 / 100
64 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; char V[4] = {'A', 'B', 'X', 'Y'}; char Stiva[30]; int T; string Sol; static inline void Go (int Level, int N) { if((int)(Sol.size())) return; if(Level > 4 * N) return; if(Level) { string ans; for(int i = 1; i < Level; ++i) ans.push_back(Stiva[i]); if(press(ans) == N && Level == N + 1) { Sol = ans; return; } } for(int i = 0; i < 4; ++i) if(T != i) { Stiva[Level] = V[i]; Go(Level + 1, N); } return; } string guess_sequence (int N) { if(N == 3) { for(int i = 0; i < 4; ++i) { string a; a.push_back(V[i]); if(press(a)) { T = i; Stiva[1] = V[i]; Go(2, N); break; } } return Sol; } else { } return "A"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...