# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
286954 | 2020-08-31T07:50:04 Z | crossing0ver | Password (RMI18_password) | C++17 | 3 ms | 288 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; vector<char> D; for (char i = 'a'; i <= 'a' + s ; i++) D.pb(i); 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; random_shuffle(D.begin(),D.end()); for (char c : D) { 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); return pref; } } return suf; } /* main() { ios::sync_with_stdio(0); cin.tie(0); }*/
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Token "ebiop" doesn't correspond to pattern "[a-o]{1,15}" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Token "aaabbc" doesn't correspond to pattern "[a-b]{1,50}" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 288 KB | Token "efdehcgbm" doesn't correspond to pattern "[a-l]{1,1000}" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Token "ebiop" doesn't correspond to pattern "[a-o]{1,15}" |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Token "ebiop" doesn't correspond to pattern "[a-o]{1,15}" |
2 | Halted | 0 ms | 0 KB | - |