#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
const int nmax = 100005;
int n;
char c[nmax];
void init(int N, const char C[]) {
n = N;
for (int i = 0; i < N; i++) {
c[i] = C[i];
}
}
int rev(int x, int k) {
int res = 0,cnt = 0;
for (int i = k - 1; i >= 0; i--) {
if (x & (1 << i)) res += (1 << cnt);
cnt++;
}
return res;
}
int query(int i, int k) {
int limit = i + (1 << k) - 1;
for (int j = i; j <= limit; j++) {
if (c[j] != c[rev(j - i , k) + i]) return 0;
}
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
2380 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |