| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1345141 | tull | Combo (IOI18_combo) | C++20 | 7 ms | 464 KiB |
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int n) {
string ans = "",tmp,f="ABXY",pos;
string y[]={"BXY","AXY","ABY","ABX"};
int x;
for(int i=0;i<4;++i){
string h;
h+=f[i];
x=press(h);
if(x==1){
ans=h;
pos=y[i];
break;
}
}
for(int i=1;i<n;++i){
tmp=ans;
tmp+=pos[0];
tmp+=ans;
tmp+=pos[1];
x=press(tmp);
if(x==i+1){
if(press(ans+pos[0])==i+1){
ans+=pos[0];
}else{
ans+=pos[1];
}
}else{
ans+=pos[2];
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
