#include <bits/stdc++.h>
using namespace std;
int query(string s);
string guess(int n, int c) {
int last=0;
string s;
while (last<n) {
int l=0, r=c-1;
while (l<r) {
int mid=(l+r)>>1;
string t=s;
for (char i='a'; i<='a'+mid; ++i) t.push_back(i);
int x=query(t);
if (x>last) r=mid;
else l=mid+1;
}
s+=('a'+r);
last=s.length();
}
return s;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Returned early from guess() after 51 queries. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
29 ms |
316 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |