Submission #663616

# Submission time Handle Problem Language Result Execution time Memory
663616 2022-11-27T03:16:54 Z Nursik Password (RMI18_password) C++17
0 / 100
69 ms 208 KB
#include <stdio.h>
 
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

#define ll long long
#define pb push_back


int query(string str);
string guess(int n, int s){
    string ans = "";
    int cur = 0;
    string pref = "";
    for (int i = 1; i <= n; ++i){
        string npref = pref;
        for (int j = 0; j < s; ++j){
            char ch = 'a';
            ch += j;
            npref = pref;
            npref += ch;
            int kek = query(npref);
            if (kek > cur){
                pref += ch;
                break;
            }
        }
        cur += 1;
    }
    return pref;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 208 KB Returned early from guess() after 187 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Returned early from guess() after 77 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 69 ms 208 KB Returned early from guess() after 11504 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 208 KB Returned early from guess() after 187 queries.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 208 KB Returned early from guess() after 187 queries.
2 Halted 0 ms 0 KB -