Submission #154308

#TimeUsernameProblemLanguageResultExecution timeMemory
154308andreiomdCombo (IOI18_combo)C++17
0 / 100
77 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 Lim) { if(Level > Lim) return; if(Level) { string ans; for(int i = 1; i < Level; ++i) ans.push_back(Stiva[i]); if(press(ans) == Lim / 4) { Sol = ans; return; } } for(int i = 0; i < 4; ++i) if(T != i) { Stiva[Level] = V[i]; Go(Level + 1, Lim); } return; } string guess_sequence (int N) { if(N == 3) { for(int i = 0; i < 4; ++i) { T = i; Stiva[1] = V[i]; Go(2, 4 * N); } return Sol; } else { } return "A"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...