# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
773151 | 2023-07-04T15:47:23 Z | aykhn | Password (RMI18_password) | C++14 | 1 ms | 208 KB |
#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 asd = ans.substr(0, j); string assd = ""; ans = asd; asd += x; asd += assd; int y = query(ans); if (y <= prev) { asd = ans.substr(0, j); assd = ""; ans = asd + assd; } } x[0]++; } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Returned early from guess() after 31 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 208 KB | Returned early from guess() after 5 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Returned early from guess() after 25 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Returned early from guess() after 31 queries. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 208 KB | Returned early from guess() after 31 queries. |
2 | Halted | 0 ms | 0 KB | - |