# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
206461 | vardan__02 | 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 <algorithm>
#include <iostream>
#include <fstream>
#include <cstring>
#include <string>
#include <vector>
#include <cstdio>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
const long long N = 200005;
const long long inf = 1e18;
#define MP make_pair
#define PB push_back
string guess_sequence(int N)
{
string ans="";
string ban="ABXY";
int v=0, x;
x = press('A')
if(x==1)
v=0;
x = press('B')
if(x==1)
v=1;
x = press('X')
if(x==1)
v=2;
x = press('Y')
if(x==1)
v=3;
ans=ban[v];
while(ans.size()!=n)
{
for(int i=0;i<=3;i++)
{
x = press(ans+ban[i]);
if(x==ans.size()+1)
{
ans+=ban[i];
break;
}
}
}
return ans;
}