Submission #1327277

#TimeUsernameProblemLanguageResultExecution timeMemory
1327277dashkaPassword (RMI18_password)C++20
0 / 100
13 ms332 KiB

#include <bits/stdc++.h>
using namespace std;

int query(string str);

string guess(int n, int s) {
    string pw = "";
    vector<bool> used(s, false);
    
    for (int i = 0; i < n; i++) {
        for (int c = 0; c < s; c++) {
            if (used[c]) continue;
            string t = pw + (char)('a' + c);
            if ((int)query(t) >= i + 1) {
                pw += (char)('a' + c);
                used[c] = true;
                break;
            }
        }
    }
    
    return pw;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...