#include <iostream>
using namespace std;
int query(string str);
string rec(int n, int s, string x, int it, int siz) {
if (siz == n) {
return x;
}
for (int i = 0; i < s; i++) {
x[it] = 97 + i;
if (query(x) == siz) {
return rec(n, s, x, it + 1,siz+1);
}
}
x[it] = x[it - 1];
it--;
return rec(n, s, x, it,siz);
}
string guess(int n, int s) {
string x;
x.resize(n);
return rec(n, s, x, 0,0);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
200 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |