# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
116186 | mirbek01 | Combo (IOI18_combo) | C++11 | 101 ms | 440 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>
# include "combo.h"
using namespace std;
string t = "ABXY";
string guess_sequence(int N) {
string ans;
int ret = press("A");
if(ret)
ans = "A";
ret = press("B");
if(ret)
ans = "B";
ret = press("X");
if(ret)
ans = "X";
ret = press("Y");
if(ret)
ans = "Y";
for(int i = 1; i < N; i ++){
for(int j = 0; j < 4; j ++){
if(t[j] == ans[0])
continue;
ans += t[j];
ret = press(ans);
if(ret != ans.size()){
ans.pop_back();
} else {
break;
}
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |