# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
286952 | 2020-08-31T07:47:04 Z | crossing0ver | Password (RMI18_password) | C++17 | 481 ms | 500 KB |
#include<bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int,int> #define vi vector<int> #define fi first #define se second #define all(x) (x).begin(),(x).end() using namespace std; int m; string suf,pref; int query(string str); string guess(int n, int s) { string pref,P; for (int i = 1; i <= n; i++) { int len = suf.size() + pref.size(); char LAST = ((int)pref.size() ? pref.back() : 'a'); int cur = len; for (int z = 1; z + pref.size() + suf.size() <= n;) { bool flag = 0; for (char c = 'a'; c < 'a' + s; c++) { P = pref + c; P += suf; int F = query(P); if (F > cur) { LAST = c; pref += c; cur = F; flag = 1; break; } } if (flag == 0) break; } reverse(all(suf)); if (pref.size()) suf+=pref.back(); reverse(all(suf)); if (pref.size()) pref.pop_back(); if (pref.size() + suf.size() == n) { pref += suf; int Z = query(pref); if (Z != n) { // return "BB"; // while(true) { // // } } return "SDA"; } } return "FSA"; } /* main() { ios::sync_with_stdio(0); cin.tie(0); }*/
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Guessed the password with 330 queries. |
2 | Correct | 8 ms | 256 KB | Guessed the password with 782 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | Guessed the password with 166 queries. |
2 | Correct | 4 ms | 256 KB | Guessed the password with 306 queries. |
3 | Correct | 3 ms | 256 KB | Guessed the password with 284 queries. |
4 | Correct | 9 ms | 256 KB | Guessed the password with 668 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 121 ms | 368 KB | Guessed the password with 20171 queries. |
2 | Correct | 268 ms | 256 KB | Guessed the password with 29527 queries. |
3 | Correct | 464 ms | 500 KB | Guessed the password with 44816 queries. |
4 | Incorrect | 481 ms | 376 KB | Could not guess the password with 50000 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Guessed the password with 330 queries. |
2 | Correct | 8 ms | 256 KB | Guessed the password with 782 queries. |
3 | Correct | 3 ms | 256 KB | Guessed the password with 166 queries. |
4 | Correct | 4 ms | 256 KB | Guessed the password with 306 queries. |
5 | Correct | 3 ms | 256 KB | Guessed the password with 284 queries. |
6 | Correct | 9 ms | 256 KB | Guessed the password with 668 queries. |
7 | Correct | 121 ms | 368 KB | Guessed the password with 20171 queries. |
8 | Correct | 268 ms | 256 KB | Guessed the password with 29527 queries. |
9 | Correct | 464 ms | 500 KB | Guessed the password with 44816 queries. |
10 | Incorrect | 481 ms | 376 KB | Could not guess the password with 50000 queries. |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 256 KB | Guessed the password with 330 queries. |
2 | Correct | 8 ms | 256 KB | Guessed the password with 782 queries. |
3 | Correct | 3 ms | 256 KB | Guessed the password with 166 queries. |
4 | Correct | 4 ms | 256 KB | Guessed the password with 306 queries. |
5 | Correct | 3 ms | 256 KB | Guessed the password with 284 queries. |
6 | Correct | 9 ms | 256 KB | Guessed the password with 668 queries. |
7 | Correct | 121 ms | 368 KB | Guessed the password with 20171 queries. |
8 | Correct | 268 ms | 256 KB | Guessed the password with 29527 queries. |
9 | Correct | 464 ms | 500 KB | Guessed the password with 44816 queries. |
10 | Incorrect | 481 ms | 376 KB | Could not guess the password with 50000 queries. |