# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
709086 | jamezzz | Password (RMI18_password) | C++17 | 188 ms | 352 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>
using namespace std;
int query(string str);
string guess(int n,int s){
string ans="";
int pv=0;
for(int i=0;i<s;++i){
char c='a'+i;
for(int j=0;j<ans.length();++j){
string tmp=ans;
tmp.insert(j,1,c);
int res=query(tmp);
if(res>pv){
pv=res;
swap(tmp,ans);
tmp.clear();
if(pv==n)return ans;
continue;
}
}
string tmp=ans;
tmp.insert(tmp.length(),n-tmp.length(),c);
pv=query(tmp);
tmp.resize(pv);
swap(ans,tmp);
tmp.clear();
if(pv==n)return ans;
}
return ans;
}
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... |