Submission #154309

#TimeUsernameProblemLanguageResultExecution timeMemory
154309andreiomdCombo (IOI18_combo)C++11
0 / 100
126 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) { 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) { T = i; Stiva[1] = V[i]; Go(2, N); } return Sol; } else { } return "A"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...