# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1117349 | Ciprian | Password (RMI18_password) | C++14 | 217 ms | 712 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){
char a='a';
vector<char>c;
map<char, int>cnt;
for(int j=1; j<=s; j++){
if(query(string(1,a))==1){
c.push_back(a);
cnt[a]=query(string(n, a));
}
a++;
}
string w;
for(int i=1; i<=n; i++){
char x=c[0];
for(int j=1; j<c.size(); j++){
if(query(w+c[j]+string(cnt[x], x))==w.size()+cnt[x]+1){
x=c[j];
}
}w+=x;
cnt[x]--;
}
return w;
}
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... |