# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1279283 | tull | Combo (IOI18_combo) | C++20 | 16 ms | 444 KiB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
int p=0,r;
char c[]={'A','B','X','Y'};
char sk;
string a="";
for(auto&e:c){
r=press(a+e);
if(r>p){
++p;
a+=e;
sk=e;
break;
}
}
while (p<N)
{
for(int i=0;i<4;++i){
char e=c[i];
if(e==sk)continue;
if(i!=3)r=press(a+e);
else r=p+1;
if(r>p){
++p;
a+=e;
break;
}
}
}
return a;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |