#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N=2e3+5, mod=1e9+7;
int query(string str);
mt19937 rng(time(NULL));
string guess(int n, int s) {
vector<char> v(s);
for(int i=0;i<s;i++) {
v[i] = char('a' + i);
}
shuffle(v.begin() , v.end() , rng);
string res;
for(int i=0;i<n;i++) {
for(int j=0;j<s;j++) {
int tmp = query(res + v[j]);
if(tmp == i + 1) {
res += v[j];
break;
}
}
}
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Returned early from guess() after 190 queries. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Returned early from guess() after 75 queries. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
49 ms |
344 KB |
Returned early from guess() after 11847 queries. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Returned early from guess() after 190 queries. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Returned early from guess() after 190 queries. |
2 |
Halted |
0 ms |
0 KB |
- |