# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
852840 | LucaLucaM | Password (RMI18_password) | C++17 | 275 ms | 436 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.
//#ifndef PASSWORD_H_INCLUDED
//#define PASSWORD_H_INCLUDED
#include <bits/stdc++.h>
#warning That's the baby, that's not my baby
typedef long long ll;
using namespace std;
int query (string str);
string guess (int n, int s) {
string answer = "";
while ((int) answer.size() < n) {
int m = (int) answer.size();
for (int i = 0; i < s; i++) {
string q = answer + string(n - m, char(i + 'a'));
int k = query(q);
if (k != m) {
for (int j = m; j < k; j++) {
answer += char(i + 'a');
}
break;
}
}
}
return answer;
}
//#endif // PASSWORD_H_INCLUDED
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... |