Submission #331977

#TimeUsernameProblemLanguageResultExecution timeMemory
331977a_playerPassword (RMI18_password)C++14
0 / 100
152 ms492 KiB
//Anyone who knows why it gives me signal 13? #include <bits/stdc++.h> #ifdef ALE #include "grader.cpp" #endif using namespace std; int query(string str); int v[50]; string solve(string ss,int n, int s){ int q=ss.size(); for(int k=0;k<s;k++)v[k]=0; char possibile='a'; v[0]=1; while(true){ string t=ss; for(int i=0;i<n-q;i++)t+=possibile; int l=query(t); bool prec=false; for(int i=0;i<s;i++){ if(v[i])continue; v[i]=1; t[q]='a'+i; if(query(t)>l){ possibile='a'+i; prec=true; i=s; } } if(!prec){ return ss+possibile; } } } string guess(int n, int s){ string sol=""; for(int q=0;q<n;q++){ sol=solve(sol,n,s); } return sol; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...