#include<bits/stdc++.h>
#include "secret.h"
using namespace std;
#define int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
#define mp make_pair
#define f first
#define s second
const int N = 1001;
int mem[N][N];
void prec(int l, int r) {
if (l == r) return;
int m = (l + r) >> 1;
prec(l, m); prec(m + 1, r);
for (int i = m - 1; i >= l; --i) mem[i][m] = Secret(mem[i][i], mem[i + 1][m]);
for (int i = m + 2; i <= r; ++i) mem[m][i] = Secret(mem[m + 1][i - 1], mem[i][i]);
}
void Init(int n, int a[]) {
for (int i = 1; i <= n; ++i) mem[i][i] = a[i];
prec(1, n);
}
int get(int tl, int tr, int l, int r) {
if (tl == tr) return mem[tl][tl];
int tm = (tl + tr) >> 1;
if (r <= tm) return get(tl, tm, l, r);
if (tm < l) return get(tm + 1, tr, l, r);
return Secret(mem[l][tm], mem[tm + 1][r]);
}
int Query(int l, int r) { return get(1, n, l, r); }
Compilation message
secret.cpp: In function 'long long int Query(long long int, long long int)':
secret.cpp:33:41: error: 'n' was not declared in this scope
int Query(int l, int r) { return get(1, n, l, r); }
^