#include <bits/stdc++.h>
#include "secret.h"
#define mp make_pair
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using cd = complex <double>;
typedef pair <int, int> pii;
const int Inf = 2e9;
const int mod = 998244353;
const double Pi = acos(-1);
void Fastio()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
int n;
int a[1005];
int Table[10][1005];
void Build(int h, int l, int r)
{
if(r - l <= 2)
{
return;
}
int mid = (l + r) >> 1;
Table[h][mid] = A[mid];
Table[h][mid - 1] = A[mid - 1];
for(int i = mid + 1; i <= r; i++)
{
Table[h][i] = Secret(Table[h][i - 1], a[i]);
}
for(int i = mid - 1; i >= l; i--)
{
Table[h][i] = Secret(a[i], Table[h][i + 1]);
}
Build(h + 1, l, mid - 1);
Build(h + 1, mid, r);
}
int Get(int l, int r, int h, int L, int R)
{
int mid = (L + R) >> 1;
if(r < mid)
{
return Get(l, r, h + 1, L, mid - 1);
}
if(l > mid)
{
return Get(l, r, h + 1, mid, R);
}
return Secret(Table[h][l], Table[h][r]);
}
void Init(int N, int b[])
{
n = N;
for(int i = 0; i < n; i++)
{
a[i] = b[i];
}
Build(0, 0, n - 1);
}
int Query(int l, int r)
{
if(r == l)
{
return A[l];
}
else if(r - l == 1)
{
return Secret(A[l], A[l + 1]);
}
ele
{
return find(l, r, 0, 0, n - 1);
}
}
Compilation message
secret.cpp: In function 'void Build(int, int, int)':
secret.cpp:34:18: error: 'A' was not declared in this scope
Table[h][mid] = A[mid];
^
secret.cpp: In function 'int Query(int, int)':
secret.cpp:76:10: error: 'A' was not declared in this scope
return A[l];
^
secret.cpp:80:17: error: 'A' was not declared in this scope
return Secret(A[l], A[l + 1]);
^
secret.cpp:82:2: error: 'ele' was not declared in this scope
ele
^~~