# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
333335 | valerikk | Password (RMI18_password) | C++17 | 0 ms | 0 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;
string guess(int n, int s) {
string ans = "";
for (int i = 0; i < n; ++i) {
for (char x = 'a'; x < 'a' + s; x++) {
if (ans.size() < n) {
ans.insert(ans.begin() + i, x);
if (query(ans) != ans.size()) ans.erase(ans.begin() + i, ans.begin() + i + 1);
}
}
}
return ans;
}