#include<iostream>
#include<unordered_map>
using namespace std;
unordered_map<string,int> umap;
int query(string str);
int intreaba(string str)
{
if(umap.count(str)==0)
umap[str]=query(str);
return umap[str];
}
string tochar(int ch)
{
char ceva=ch+'a';
string nush="";
nush=nush+ceva;
return nush;
}
string guess(int n, int s)
{
umap.clear();
string rez="";
for(int i=1;i<=n;i++)
{
for(int ch=0;ch<26;ch++)
{
if(query(rez+tochar(ch))==query(rez))
continue;
bool bl=0;
for(int bd=0;bd<26;bd++)
{
if(query(rez+tochar(ch))<query(rez+tochar(bd)+tochar(ch)))
{
bl=1;
break;
}
}
if(bl==1)
{
rez=rez+tochar(ch);
break;
}
}
}
return rez;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
0 ms |
208 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
0 ms |
208 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1 ms |
208 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
0 ms |
208 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
0 ms |
208 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |