# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199683 | zoooma13 | Password (RMI18_password) | C++14 | 611 ms | 460 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 s);
string guess(int n ,int s){
pair <int ,int> frq[s];
for(char c='a'; c<'a'+s; c++)
frq[c-'a'] = {query(string(n ,c)) ,c};
int lst = 0;
string ans;
for(int j=0; j<s; j++){
char c = frq[j].second;
for(int i=0; frq[j].first && ans.size()<n && i<=ans.size(); i++){
string ss = ans;
ss.insert(ss.begin()+i ,c);
int q = query(ss);
if(q > lst){
ans = ss;
lst = q;
frq[j].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... |