# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445489 | PiejanVDC | Combo (IOI18_combo) | C++17 | 73 ms | 576 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 <combo.h>
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int n) {
//for the first character
string s="";
if(press("A")) {
s+='A';
}
else if(press("B")) {
s+='B';
} else if(press("X")) {
s+='X';
} else {
s+='Y';
}
vector<char>str={'A','B','X','Y'};
while(s.length() < n) {
for(auto z : str) {
if(z != s[0]) {
string prev = s;
s+=z;
if(press(s) == s.length()) {
break;
}
s=prev;
}
}
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |