# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1117312 | plescagheorghe07 | Password (RMI18_password) | C++17 | 1000 ms | 336 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 <iostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
#include <unistd.h>
#include <fstream>
using namespace std;
int query( string s );
string guess(int n, int s) {
string chars = "";
string result = "";
for (int i = 0; i < s; ++i)
chars += char('a' + i);
int last_match = 0;
while (result.size() < n) {
for (char c : chars) {
string temp = result + c;
int curr_match = query(temp);
if (curr_match > last_match) {
result += c;
last_match = curr_match;
break;
}
}
}
return result;
}
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... |