Submission #303796

#TimeUsernameProblemLanguageResultExecution timeMemory
303796GilgameshCombo (IOI18_combo)C++17
0 / 100
0 ms200 KiB
#include "combo.h" std::string guess_sequence(int N) { std::string strs[4] = {"A", "B", "X", "Y"}; std::string ans = ""; for(int i = 0; i < N; ++i){ int ab = press(ans + strs[0] + ans + strs[1]); if(ab == i + 1){ int a = press(ans + strs[0]); if(a == i + 1){ ans += strs[0]; } else ans += strs[1]; } else{ int x = press(ans + strs[2]); if(x == i + 1){ ans += strs[2]; } else ans += strs[3]; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...