Submission #367881

#TimeUsernameProblemLanguageResultExecution timeMemory
367881tamaritoCombo (IOI18_combo)C++14
10 / 100
69 ms532 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { string s = ""; if (press(s + 'A') == 1) { s += 'A'; } else if (press(s + 'B') == 1) { s += 'B'; } else if (press(s + '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'; } else if (s[0] != 'X' and press(s + 'X') == i + 1) { s += 'X'; } else { s += 'Y'; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...