#include "brperm.h"
#include <bits/stdc++.h>
using namespace std;
#define N 500001
#define nl '\n'
#define ff first
#define ss second
#define add insert
#define ll long long
#define ld long double
#define terminator main
#define pll pair<ll,ll>
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
char a[N];
int rev(int x, int k){
int ans = 0;
for(int i = 0; i < k; i++)
if((x >> i) & 1)
ans += (1 << (k - i - 1));
return ans;
}
void init(int n, const char s[]) {
for(int i = 0; i < n; i++)
a[i] = s[i];
}
int query(int n, int k) {
for(int i = n; i < n + (1 << k); i++)
if(a[i] != a[n + rev(i - n, k)])
return 0;
return 1;
}
# | 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... |