# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
701020 | BobCompetitiveProgramming | Combo (IOI18_combo) | C++14 | 63 ms | 572 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std; using ll=long long;
/*
int press(string s){
cout << " IN PRESS, ans with string s = " << s << endl;
ll ret; cin>>ret;
return ret;
}
*/
int press(std::string p);
string guess_sequence(int N){
string S = "", first;
vector<string> buttons{"A", "B", "X", "Y"};
for(auto& button : buttons)
if(press(button))
first = button, S += button;
while(true){
if(S.size() == N)
return S;
for(auto& button : buttons)
if(button != first && press(S + button) > S.size())
S += button;
}
}
/*
int main(){
guess_sequence(5);
}
*/
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |