Submission #83796

#TimeUsernameProblemLanguageResultExecution timeMemory
83796AdrienVannsonCombo (IOI18_combo)C++17
30 / 100
95 ms448 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string res = ""; bool estSuivantAB; string guess_sequence (int nbElements) { estSuivantAB = press("AB") > 0; while ((int)res.size() < nbElements) { if (estSuivantAB) { if (press(res+"A") == (int)res.size()+1) { res += "A"; } else { res += "B"; } } else { if (press(res+"X") == (int)res.size()+1) { res += "X"; } else { res += "Y"; } } estSuivantAB = press(res+"A"+res+"B") > (int)res.size(); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...