Submission #699499

#TimeUsernameProblemLanguageResultExecution timeMemory
699499khshgCombo (IOI18_combo)C++14
5 / 100
1 ms208 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int N) { vector<string> v = {"X", "Y", "A", "B"}; string ans; if(press(v[0] + v[1])) { if(press(v[0])) { ans = v[0]; } else { ans = v[1]; } } else { if(press(v[2])) { ans = v[2]; } else { ans = v[3]; } } v.erase(find(begin(v), end(v), ans)); for(int i = 2; i < N; ++i) { ans += v[i + 1 - press(ans + v[0] + v[0] + ans + v[0] + v[1] + ans + v[0] + v[2] + ans + v[1])]; } if(press(ans + v[0] + ans + v[1]) == N) { if(press(ans + v[0]) == N) { ans += v[0]; } else { ans += v[1]; } } else { ans += v[2]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...