#include <bits/stdc++.h>
#include "brperm.h"
#ifdef MINA
#include "grader.cpp"
#endif
using namespace std;
#define ll long long
int rev(int x, int k) {
int y = 0;
for (int i = 0; i < k; i++) {
y |= ((x >> (k - 1 - i)) & 1) << i;
}
return y;
}
char a[500'005];
void init(int n, const char s[]) {
for (int i = 0; i < n; i++) {
a[i] = s[i];
}
}
int query(int i, int k) {
int ok = 1;
for (int j = i; j < i + (1 << k); j++) {
ok &= a[rev(j - i, k) + i] == a[j];
}
return ok;
}
// int main() {
// ios_base::sync_with_stdio(0), cin.tie(0);
// int k;
// cin >> k;
// for (int i = 0; i < (1 << k); i++) {
// cout << rev(i, k) << '\n';
// }
// return 0;
// }
//
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
543 ms |
452 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
543 ms |
452 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
654 ms |
3060 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
543 ms |
452 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |