# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
773223 | 2023-07-04T17:03:06 Z | aykhn | Password (RMI18_password) | C++14 | 267 ms | 356 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 = 0; for (int i = 0; i < s; i++) { for (int j = 0; j <= ans.length(); j++) { string bfr = ans; ans.insert(ans.begin() + j, 'a' + i); int x = query(ans); if (x <= prev) ans = bfr; else prev = x; if (ans.length() == n) break; } if (ans.length() == n) break; } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 294 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
2 | Correct | 2 ms | 208 KB | Guessed the password with 166 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 28 ms | 304 KB | Guessed the password with 4807 queries. |
2 | Correct | 80 ms | 348 KB | Guessed the password with 10754 queries. |
3 | Correct | 125 ms | 344 KB | Guessed the password with 14365 queries. |
4 | Correct | 126 ms | 356 KB | Guessed the password with 20878 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 294 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 166 queries. |
5 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
6 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
7 | Correct | 28 ms | 304 KB | Guessed the password with 4807 queries. |
8 | Correct | 80 ms | 348 KB | Guessed the password with 10754 queries. |
9 | Correct | 125 ms | 344 KB | Guessed the password with 14365 queries. |
10 | Correct | 126 ms | 356 KB | Guessed the password with 20878 queries. |
11 | Incorrect | 267 ms | 336 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 208 KB | Guessed the password with 133 queries. |
2 | Correct | 3 ms | 208 KB | Guessed the password with 294 queries. |
3 | Correct | 1 ms | 208 KB | Guessed the password with 71 queries. |
4 | Correct | 2 ms | 208 KB | Guessed the password with 166 queries. |
5 | Correct | 1 ms | 208 KB | Guessed the password with 102 queries. |
6 | Correct | 2 ms | 208 KB | Guessed the password with 228 queries. |
7 | Correct | 28 ms | 304 KB | Guessed the password with 4807 queries. |
8 | Correct | 80 ms | 348 KB | Guessed the password with 10754 queries. |
9 | Correct | 125 ms | 344 KB | Guessed the password with 14365 queries. |
10 | Correct | 126 ms | 356 KB | Guessed the password with 20878 queries. |
11 | Incorrect | 267 ms | 336 KB | Could not guess the password with 50000 queries. |
12 | Halted | 0 ms | 0 KB | - |