Submission #615817

#TimeUsernameProblemLanguageResultExecution timeMemory
615817Minindu2006Combo (IOI18_combo)C++17
0 / 100
1 ms208 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; std::string guess_sequence(int n) { vector<string> controls{"A", "B", "X", "Y"}; string ans; for(int i=0;i<3;i++) if(press(controls[i])) ans += controls[i]; if(ans.empty()) ans += controls[3]; remove(controls.begin(), controls.end(), ans); if(n == 1) return ans; for(int i=0;i<n-1;i++) { int x = i + 2; int len = press(ans + controls[1] + ans + controls[0] + controls[0] + ans + controls[0] + controls[1] + ans + controls[0] + controls[2]); ans += controls[len - x]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...