Submission #116190

#TimeUsernameProblemLanguageResultExecution timeMemory
116190mirbek01Combo (IOI18_combo)C++11
30 / 100
87 ms520 KiB
# include <bits/stdc++.h> # include "combo.h" using namespace std; string t = "ABXY"; string guess_sequence(int N) { string ans; for(int i = 0; i < N; i ++){ string s; s = ans + 'A' + ans + 'B'; int ret = press(s); if(ret == i){ s = ans + 'X'; ret = press(s); if(ret == i) ans = ans + 'Y'; else ans = ans + 'X'; } else { s = ans + 'A'; ret = press(s); if(ret == i) ans = ans + 'B'; else ans = ans + 'A'; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...