# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
805327 | Malix | Combo (IOI18_combo) | C++14 | 1 ms | 208 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;
std::string guess_sequence(int N) {
vector<string> b = {"A", "B", "X", "Y"};
string S;
for(int i=0;i<3;i++){
if(press(b[0])){
S+=b[i];
b.erase(b.begin()+i);
}
}
if(!S.size()){
S+=b[3];
b.erase(b.begin()+3);
}
int k=1;
for(int i=0;i<N-1;i++){
for(int i=0;i<2;i++){
if(press(b[0])){
S+=b[i];
}
}
if(S.size()!=k+1){
S+=b[3];
}
k++;
}
return S;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |