This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
const int MAXN = 1010;
char str[MAXN];
void init(int n, const char ss[]) {
for (int i = 0; i < n; ++i)
str[i] = ss[i];
}
int query(int x, int k) {
for (int mask = 0; mask < (1 << k); ++mask) {
int rev = 0;
for (int i = 0; i < k; ++i)
if (mask & (1 << i)) rev |= 1 << (k - 1 - i);
if (str[x + mask] != str[x + rev]) 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... |