Submission #1221863

#TimeUsernameProblemLanguageResultExecution timeMemory
1221863anonymous321Brperm (RMI20_brperm)C++20
0 / 100
3094 ms2016 KiB
#include "brperm.h"
#include <bits/stdc++.h>
using namespace std;

string ss;
int N;

void init(int n, const char s[]) {
    ss = "";
    N = n;
    for (int i = 0; i < n; i++) {
        ss += s[i];
    }
    return;
}

int query(int i, int k) {
    if (i + (1 << k) > N) return false;
    bool b = true;
    for (int j = 0; j < (1 << k); j++) {
        int o = 0;
        for (int l = 0; l < k; l++) {
            if ((j >> l) & 1) o += 1 << (k - l - 1);
        }
        if (ss[j] != ss[o]) {
            b = false;
            return false;
        }
    }
    return true;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...