Submission #772152

#TimeUsernameProblemLanguageResultExecution timeMemory
772152AlfraganusCombo (IOI18_combo)C++14
0 / 100
1 ms208 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { string s; if(press("A") == 1)s = "A"; else if(press("B") == 1)s = "B"; else if(press("X") == 1)s = "X"; else s = "Y"; for(int i = 1; i < n; i ++){ if(s[0] != 'A' and press(s + 'A') == i + 1)s += 'A'; else if(s[0] != 'B' and press(s + 'B') == i + 1) s += 'B'; if(s[0] != 'Y'){ if(s[0] != 'X' and press(s + 'X') == i + 1) s += 'X'; else s += 'Y'; } else s += 'X'; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...