# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
773160 | aykhn | Password (RMI18_password) | C++14 | 6 ms | 304 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>
// author: aykhn
using namespace std;
typedef long long ll;
int query(string str);
string guess(int n, int s)
{
string ans = "";
int prev;
string x = "a";
for (int i = 0; i < s; i++)
{
ans = x + ans;
int X = query(ans);
prev = max(X, prev);
if (!X) ans = ans.substr(1, (int)(ans.length()) - 1);
for (int j = 1; j <= ans.length(); j++)
{
string asdasdasd = ans;
string asd = ans.substr(0, j);
string assd = "";
if (j != ans.length()) assd = ans.substr(j, (int)(ans.length()) - j);
ans = asd;
ans += x;
ans += assd;
int y = query(ans);
if (y <= prev)
{
ans = asdasdasd;
}
else prev = y;
}
x[0]++;
}
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... |