# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
867698 | franfill | Password (RMI18_password) | C++17 | 0 ms | 444 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 cur = "";
int N, S;
int solve(int i, char c)
{
if (c > 'z' || cur.size() == N)
return 0;
string tr = cur.substr(0, i);
tr += c;
tr += cur.substr(i, ((int)cur.size())-i);
if (query(tr) == tr.size())
{
int ans = 1;
cur = tr;
ans += solve(i, c);
ans += solve(i+ans, c+1);
return ans;
}
else
return solve(i, c+1);
}
string guess(int N, int S)
{
::N = N;
::S = S;
cur = "";
solve(0, 'a');
return cur;
}
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... |