Submission #755108

# Submission time Handle Problem Language Result Execution time Memory
755108 2023-06-09T12:08:24 Z Stickfish Brperm (RMI20_brperm) C++17
0 / 100
201 ms 4508 KB
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
 
typedef long long ll;
typedef pair<int, int> pii;
 
string s;
 
void init(int n, const char s0[]) {
    for(int i = 0 ; i < n; i ++ ){
        s.push_back(s0[i]);
    }
}
 
int query(int i, int k) {
    int sz = (1 << k);
    //if(i + sz - 1 >= s.size()) return 0;
    vector<char> A(sz), B(sz);
    for(int j = 0 ; j < sz; j ++ ){
        A[j] = s[i + j];
        int f = 0;
        for(int p = 0; p < k ; p ++ ){
            if((j & (1 << p))){
                f |= (1 << (k - p - 1));
            }
        }
        B[f] = s[i + j];
    }
 
    return (A == B);
}
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1492 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1492 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 201 ms 4508 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1492 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -