# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251360 | dantoh000 | Password (RMI18_password) | C++14 | 557 ms | 776 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>
using namespace std;
int ct[26];
int query(string str);
vector<char> Q;
vector<char> T;
vector<string> pq;
bool query(){
string str = "";
for (auto x : Q) str += x;
for (int i = T.size()-1; i >= 0; i--) str += T[i];
return query(str) == str.size();
}
string merge(string s, string t){
Q.clear();
string test = ""; test += s[0];
for (auto x : t) test += x;
if (s.size() == 0 || query(test) != t.size()+1){
swap(s,t);
}
int n = s.size(), m = t.size();
int cur = 0;
for (int i = n-1; i >= 0; i--){
T.push_back(s[i]);
}
for (int i = 0; i < n-1; i++){
Q.push_back(s[i]);
T.pop_back();
//printf("before adding s %c\n",s[i]);
while (cur < m){
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... |