| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1369617 | hasan | Combo (IOI18_combo) | C++20 | 7 ms | 456 KiB |
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
vector<char> kk,k={'A','B','X','Y'};
string guess_sequence(int n){
int cnt=0;
string ans="";
for(int i=0; i<n; i++){
if(i==0){
int j=0;
ans.push_back(k[j]);
while(j<3 && press(ans)!=ans.size()){
j++;
cnt++;
ans.pop_back();
ans.push_back(k[j]);
}
for(int r=0; r<4; r++)
if(j!=r) kk.push_back(k[r]);
}
else{
int j=0;
ans.push_back(kk[j]);
while(j<2 && press(ans)!=ans.size()){
j++;
cnt++;
ans.pop_back();
ans.push_back(kk[j]);
}
}
}
return ans;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
