| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1332116 | feyza | 콤보 (IOI18_combo) | C++20 | 12 ms | 456 KiB |
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
unordered_set<string>el;
string guess_sequence(int N)
{
el.insert("A");
el.insert("B");
el.insert("X");
el.insert("Y");
string s;
for(string i : el)
{
if(press(i)==1)
{
s=i;
break;
}
}
el.erase(el.find(s));
int lastsz=1;
string curr,ask;
while(lastsz!=N)
{
for(string nxt : el)
{
curr=s;
ask="";
for(int j=1;ask.size()+lastsz+j<=4*N;j++)
{
curr+=nxt;
ask+=curr;
}
int ret=press(ask);
if(ret>lastsz)
{
for(int i=lastsz+1;i<=ret;i++)
s+=nxt;
lastsz=s.size();
break;
}
}
}
return s;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
