Submission #588947

#TimeUsernameProblemLanguageResultExecution timeMemory
588947EmunemuCombo (IOI18_combo)C++17
30 / 100
56 ms480 KiB
#include "combo.h" #include <iostream> using namespace std; string guess_sequence(int N) { string S = ""; int coins = press("AB"); if (coins==0) { coins = press("X"); if (coins==0) { S+= 'Y'; } else { S+= 'X'; } } else { coins = press("A"); if (coins ==0) { S+='B'; } else { S+='A'; } } for (int i = 1; i < N; ++i) { int coins = press(S+'A'+S+'B'); if (coins>i) { coins=press(S+'A'); if (coins>i) { S+='A'; } else { S+='B'; } } else { coins=press(S+'X'); if (coins > i) { S+='X'; } else { S+='Y'; } } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...