# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164338 | aggu_01000101 | Combo (IOI18_combo) | C++14 | 0 ms | 0 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 <iostream>
#include "combo.h"
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <fstream>
#include <set>
#include <iomanip>
#include <unordered_map>
#define int long long
using namespace std;
string guess_sequence(int n){
string lol[] = {"A", "B", "X", "Y"};
int taken = 0;
while(press(lol[taken])==0) taken++;
string s = lol[taken];
for(int i = 1;i<n;i++){
for(int j = 0;j<4;j++){
if(j==taken) continue;
int rn = press(s + lol[j]);
if(rn==(i+1)){
s+=lol[j];
j = 5;
}
}
}
return s;
}