Submission #899555

#TimeUsernameProblemLanguageResultExecution timeMemory
899555SuPythonyCombo (IOI18_combo)C++17
30 / 100
25 ms1224 KiB
#include <bits/stdc++.h> int press(std::string p); std::string guess_sequence(int n) { std::string ans=""; if (press("AB")) { if (press("A")) ans="A"; else ans="B"; } else { if (press("X")) ans="X"; else ans="Y"; } std::string f=ans; int l=1; while (l<n) { if ((f!="A"||f!="B")&&press(ans+"A"+ans+"B")>l) { if (f!="A"&&press(ans+"A")>l) { ans+="A"; } else { ans+="B"; } } else { if (f!="X"&&press(ans+"X")>l) { ans+="X"; } else { ans+="Y"; } } l++; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...