# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
457490 |
2021-08-07T07:47:07 Z |
AdamGS |
Brperm (RMI20_brperm) |
C++14 |
|
0 ms |
0 KB |
#include "brperm.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=5e5+7;
int n;
char T[LIM];
void init(int x, const char s[]) {
n=x;
rep(i, n) T[i]=s[i];
}
int odw(int x, int k) {
int ans=0;
rep(i, k) {
if(x&(1<<i)) ans+=1<<(k-i-1);
}
return ans;
}
int querry(int i, int k) {
rep(j, 1<<k) {
if(s[i+j]!=s[i+odw(j, k)]) return 0;
}
return 1;
}
Compilation message
brperm.cpp: In function 'int querry(int, int)':
brperm.cpp:25:20: error: 's' was not declared in this scope
25 | if(s[i+j]!=s[i+odw(j, k)]) return 0;
| ^