# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
755900 | vjudge1 | Password (RMI18_password) | C++17 | 433 ms | 408 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.
///YOU WILL MAKE IT
#include<bits/stdc++.h>
using namespace std;
int query(string s);
string guess(int n,int s){
string cur="";
map<char,int> mp;
for(int i=0;i<s;i++){
string cur="";
cur+=('a'+i);
for(int j=1;j<=n;j++){
if(query(cur)==j){
mp[(i+'a')]++;
cur+=(i+'a');
}
}
}
string ans="";
for(auto i:mp){
for(int j=0;j<i.second;j++){
bool f=0;
for(int k=0;k<ans.size();k++){
string temp=ans;
temp.insert(temp.begin()+k,i.first);
if(query(temp)==temp.size()){
ans=temp;
f=1;
break;
}
}
if(!f){
ans.push_back(i.first);
}
}
}
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... |