| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 93384 | temoyanteladze | Combo (IOI18_combo) | C++14 | 2 ms | 200 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<bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int n)
{
string s="";
string v="ABXY";
if (press("A"))
s+="A";
if (press("B"))
s+="B";
if (press("X"))
s+="X";
if (s.empty())
s+="Y";
int k=v.find(s);
v.erase(v.begin()+k);
for (int i=2;i<n;i++)
{
int p=press(s+v[0]+s+v[1]+v[0]+s+v[1]+v[1]+s+v[1]+v[2]);
if (p==i)
{
s+=v[0];
continue;
}
if (p==i+1)
{
s+=v[1];
continue;
}
s+=v[2];
}
if (press(s+v[0])==n)
s+=v[0];
if (press(s+v[1])==n)
s+=v[1];
int sz=s.size();
if (sz!=n)
s+=v[2];
return s;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
