# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
755904 | vjudge1 | Password (RMI18_password) | C++17 | 1045 ms | 320 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;
string st; int k;
int query(string str);
string guess(int n, int s) {
string S(n, 'a');
int freq[s]{0};
for(int l = 0; l < s; l++) {
for(int i = 0; i < n; i++)
S[i] = char('a' + l);
freq[l] = query(S);
}
S = "";
for(int l = 0; l < s; l++) {
for(int i = 0, last = 0; i < freq[l]; i++) {
for(;; last++) {
string str = "";
for(int e = 0; e < last; e++) str.push_back(S[e]);
str.push_back(char('a' + l));
for(int e = last; e < S.size(); e++)
str.push_back(S[e]);
if(query(str) == str.size()) {
S = str; last++; break;
}
}
}
}
return S;
}
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... |