#include <bits/stdc++.h>
#ifdef ALE
#include "grader.cpp"
#endif
using namespace std;
int query(string p);
int v[50];
string sol,t;
bool found;
char possible='a';
int l;
string guess(int a, int b){
for(int q=0;q<a;q++){
for(int k=0;k<b;k++)v[k]=0;
found=false;
possible='a';
v[0]=1;
while(!found){
t=sol;
for(int i=0;i<a-q;i++)t+=possible;
l=query(t);
bool prev=false;
for(int i=0;i<b;i++){
if(v[i])continue;
v[i]=1;
t[sol.size()]='a'+i;
if(query(t)>l){
possible='a'+i;
prev=true;
i=b;
}
}
if(!prev){
sol+=possible;
found=true;
}
}
}
return sol;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
364 KB |
Execution killed with signal 13 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
364 KB |
Execution killed with signal 13 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
174 ms |
492 KB |
Execution killed with signal 13 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
364 KB |
Execution killed with signal 13 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
3 ms |
364 KB |
Execution killed with signal 13 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |