# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
331922 | a_player | Password (RMI18_password) | C++14 | 166 ms | 512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#ifndef EVAL
#include "grader.cpp"
#endif
using namespace std;
int query(string str);
string guess(int n, int s){
string t="";
string sol="";
vector<bool> v(s);
for(int q=0;q<n;q++){
for(int k=0;k<s;k++)v[k]=0;
bool found=false;
char possible='a';
v[0]=1;
while(!found){
t=sol;
while(t.size()<n)t+=possible;
int l=query(t);
bool prev=false;
for(int i=0;i<s;i++){
if(v[i])continue;
v[i]=true;
t[sol.size()]='a'+i;
if(query(t)>l){
possible='a'+i;
prev=true;
break;
}
}
if(!prev){
sol+=possible;
found=true;
}
}
}
return sol;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |