Submission #457490

#TimeUsernameProblemLanguageResultExecution timeMemory
457490AdamGSBrperm (RMI20_brperm)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

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;
      |                    ^