/**
* author: milos
* created: 04.05.2021 20:27:22
**/
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
string s = "";
void init(int n, const char seq[]) {
for (int i = 0; i < n; i++) {
s += seq[i];
}
}
int Rev(int x, int k) {
int ret = 0;
for (int i = 0; i < k; i++) {
if (x & (1 << i)) {
ret += (1 << (k - i - 1));
}
}
return ret;
}
int query(int i, int k) {
if (i + (1 << k) > (int) s.size()) {
return 0;
}
for (int j = i; j < i + (1 << k); j++) {
if (s[i] != s[i + Rev(j - i, k)]) {
return 0;
}
}
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3047 ms |
2536 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |