# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
956051 | Faissel | Combo (IOI18_combo) | C++17 | 23 ms | 1464 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;
#include "combo.h"
#define ll long long
#define endl '\n'
string guess_sequence(int n) {
string y = "ABXY";
string ans = "";
for(int i=1;i<=n;i++){
bool f= false;
for(int j=0;j<y.size()-1;j++){
int val = press(ans+y[j]);
if(val == i){
ans += y[j];
f = true;
if(i==1)y.erase(y.begin()+j);
break;
}
}
if(!f){
ans += y[y.size()-1];
if(i==1)y.erase(y.begin()+y.size()-1);
}
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |