horses.cpp:4:20: error: expected ']' before ';' token
#define SIZE 500100;
^
horses.cpp:11:16: note: in expansion of macro 'SIZE'
long long mult[SIZE << 2];
^~~~
horses.cpp:11:21: error: expected unqualified-id before '<<' token
long long mult[SIZE << 2];
^~
horses.cpp:4:20: error: expected ']' before ';' token
#define SIZE 500100;
^
horses.cpp:12:12: note: in expansion of macro 'SIZE'
int maxLoc[SIZE << 2];
^~~~
horses.cpp:12:17: error: expected unqualified-id before '<<' token
int maxLoc[SIZE << 2];
^~
horses.cpp:4:20: error: expected ']' before ';' token
#define SIZE 500100;
^
horses.cpp:13:18: note: in expansion of macro 'SIZE'
long double lazy[SIZE << 2], A[SIZE], maxValue[SIZE << 2];
^~~~
horses.cpp:13:23: error: expected unqualified-id before '<<' token
long double lazy[SIZE << 2], A[SIZE], maxValue[SIZE << 2];
^~
horses.cpp:13:36: error: expected unqualified-id before ']' token
long double lazy[SIZE << 2], A[SIZE], maxValue[SIZE << 2];
^
horses.cpp:13:53: error: expected unqualified-id before '<<' token
long double lazy[SIZE << 2], A[SIZE], maxValue[SIZE << 2];
^~
horses.cpp:4:20: error: expected ']' before ';' token
#define SIZE 500100;
^
horses.cpp:14:7: note: in expansion of macro 'SIZE'
int X[SIZE], Y[SIZE], N;
^~~~
horses.cpp:14:11: error: expected unqualified-id before ']' token
int X[SIZE], Y[SIZE], N;
^
horses.cpp:14:20: error: expected unqualified-id before ']' token
int X[SIZE], Y[SIZE], N;
^
horses.cpp: In function 'void update2(int, int, int, int)':
horses.cpp:18:3: error: 'mult' was not declared in this scope
mult[id] = X[l];
^~~~
horses.cpp:18:14: error: 'X' was not declared in this scope
mult[id] = X[l];
^
horses.cpp:28:2: error: 'mult' was not declared in this scope
mult[id] = muld[id << 1] * mult[id << 1 | 1] % MOD;
^~~~
horses.cpp:28:13: error: 'muld' was not declared in this scope
mult[id] = muld[id << 1] * mult[id << 1 | 1] % MOD;
^~~~
horses.cpp: In function 'void update1(int, int, int, int, int, long double)':
horses.cpp:32:10: error: 'ql' was not declared in this scope
if(l == ql && r == qr){
^~
horses.cpp:32:10: note: suggested alternative: 'l'
if(l == ql && r == qr){
^~
l
horses.cpp:32:21: error: 'qr' was not declared in this scope
if(l == ql && r == qr){
^~
horses.cpp:32:21: note: suggested alternative: 'r'
if(l == ql && r == qr){
^~
r
horses.cpp:33:3: error: 'tree' was not declared in this scope
tree[id] += diff;
^~~~
horses.cpp:33:3: note: suggested alternative: 'free'
tree[id] += diff;
^~~~
free
horses.cpp:34:3: error: 'lazy' was not declared in this scope
lazy[id] += diff;
^~~~
horses.cpp:34:3: note: suggested alternative: 'labs'
lazy[id] += diff;
^~~~
labs
horses.cpp:37:5: error: 'lazy' was not declared in this scope
if(lazy[id] != 0){
^~~~
horses.cpp:37:5: note: suggested alternative: 'labs'
if(lazy[id] != 0){
^~~~
labs
horses.cpp:40:3: error: 'tree' was not declared in this scope
tree[id << 1] +=lazy[id];
^~~~
horses.cpp:40:3: note: suggested alternative: 'free'
tree[id << 1] +=lazy[id];
^~~~
free
horses.cpp:53:5: error: 'maxValue' was not declared in this scope
if(maxValue[id << 1] > maxValue[id << 1 | 1]){
^~~~~~~~
horses.cpp:53:5: note: suggested alternative: 'si_value'
if(maxValue[id << 1] > maxValue[id << 1 | 1]){
^~~~~~~~
si_value
horses.cpp:55:3: error: 'maxLoc' was not declared in this scope
maxLoc[id] = maxLoc[id << 1];
^~~~~~
horses.cpp:55:3: note: suggested alternative: 'malloc'
maxLoc[id] = maxLoc[id << 1];
^~~~~~
malloc
horses.cpp:58:3: error: 'maxLoc' was not declared in this scope
maxLoc[id] = maxLoc[id << 1 | 1];
^~~~~~
horses.cpp:58:3: note: suggested alternative: 'malloc'
maxLoc[id] = maxLoc[id << 1 | 1];
^~~~~~
malloc
horses.cpp: In function 'long long int solve(int, int, int, int, int)':
horses.cpp:64:10: error: 'mult' was not declared in this scope
return mult[id];
^~~~
horses.cpp: In function 'void build(int, int, int)':
horses.cpp:77:3: error: 'maxLoc' was not declared in this scope
maxLoc[id] = l;
^~~~~~
horses.cpp:77:3: note: suggested alternative: 'malloc'
maxLoc[id] = l;
^~~~~~
malloc
horses.cpp:78:3: error: 'mult' was not declared in this scope
mult[id] = X[l];
^~~~
horses.cpp:78:14: error: 'X' was not declared in this scope
mult[id] = X[l];
^
horses.cpp:79:3: error: 'maxValue' was not declared in this scope
maxValue = A[l];
^~~~~~~~
horses.cpp:79:3: note: suggested alternative: 'si_value'
maxValue = A[l];
^~~~~~~~
si_value
horses.cpp:79:14: error: 'A' was not declared in this scope
maxValue = A[l];
^
horses.cpp:86:5: error: 'maxValue' was not declared in this scope
if(maxValue[id << 1] > maxValue[id << 1 | 1]){
^~~~~~~~
horses.cpp:86:5: note: suggested alternative: 'si_value'
if(maxValue[id << 1] > maxValue[id << 1 | 1]){
^~~~~~~~
si_value
horses.cpp:87:3: error: 'maxLoc' was not declared in this scope
maxLoc[id] = maxLoc[id << 1];
^~~~~~
horses.cpp:87:3: note: suggested alternative: 'malloc'
maxLoc[id] = maxLoc[id << 1];
^~~~~~
malloc
horses.cpp:90:3: error: 'maxLoc' was not declared in this scope
maxLoc[id] = maxLoc[id << 1 | 1];
^~~~~~
horses.cpp:90:3: note: suggested alternative: 'malloc'
maxLoc[id] = maxLoc[id << 1 | 1];
^~~~~~
malloc
horses.cpp:93:2: error: 'mult' was not declared in this scope
mult[id] = mult[id << 1] * mult[id << 1 | 1] % MOD;
^~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:97:2: error: 'N' was not declared in this scope
N = n;
^
horses.cpp:99:3: error: 'X' was not declared in this scope
X[i] = XX[i - 1];
^
horses.cpp:100:3: error: 'Y' was not declared in this scope
Y[i] = YY[i - 1];
^
horses.cpp:104:3: error: 'A' was not declared in this scope
A[i] = A[i - 1] + log10(X[i]);
^
horses.cpp:104:27: error: 'X' was not declared in this scope
A[i] = A[i - 1] + log10(X[i]);
^
horses.cpp:108:3: error: 'A' was not declared in this scope
A[i] += log10[Y[i]];
^
horses.cpp:108:17: error: 'Y' was not declared in this scope
A[i] += log10[Y[i]];
^
horses.cpp:112:28: error: 'maxLoc' was not declared in this scope
return solve(1, 1, N , 1, maxLoc[1]) * Y[maxLoc[1]] % MOD;
^~~~~~
horses.cpp:112:28: note: suggested alternative: 'malloc'
return solve(1, 1, N , 1, maxLoc[1]) * Y[maxLoc[1]] % MOD;
^~~~~~
malloc
horses.cpp:112:41: error: 'Y' was not declared in this scope
return solve(1, 1, N , 1, maxLoc[1]) * Y[maxLoc[1]] % MOD;
^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:117:39: error: 'X' was not declared in this scope
long double diff = log(val) - log(X[pos]);
^
horses.cpp:119:19: error: 'N' was not declared in this scope
update1(1, 1, N, pos, N, diff);
^
horses.cpp:122:31: error: 'maxValue' was not declared in this scope
return query2(1, 1, N, 1, maxValue[1]) * Y[maxValue[1]] % MOD;
^~~~~~~~
horses.cpp:122:31: note: suggested alternative: 'si_value'
return query2(1, 1, N, 1, maxValue[1]) * Y[maxValue[1]] % MOD;
^~~~~~~~
si_value
horses.cpp:122:12: error: 'query2' was not declared in this scope
return query2(1, 1, N, 1, maxValue[1]) * Y[maxValue[1]] % MOD;
^~~~~~
horses.cpp:122:46: error: 'Y' was not declared in this scope
return query2(1, 1, N, 1, maxValue[1]) * Y[maxValue[1]] % MOD;
^
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:128:36: error: 'Y' was not declared in this scope
long double diff = log(val) - log(Y[pos]);
^
horses.cpp:130:10: error: 'N' was not declared in this scope
add(1,1,N,pos,pos,diff);
^
horses.cpp:130:2: error: 'add' was not declared in this scope
add(1,1,N,pos,pos,diff);
^~~
horses.cpp:130:2: note: suggested alternative: 'rand'
add(1,1,N,pos,pos,diff);
^~~
rand
horses.cpp:132:23: error: 'maxLoc' was not declared in this scope
return solve(1,1,N,1,maxLoc[1]) * Y[maxValue[1]] % MOD;
^~~~~~
horses.cpp:132:23: note: suggested alternative: 'malloc'
return solve(1,1,N,1,maxLoc[1]) * Y[maxValue[1]] % MOD;
^~~~~~
malloc
horses.cpp:132:38: error: 'maxValue' was not declared in this scope
return solve(1,1,N,1,maxLoc[1]) * Y[maxValue[1]] % MOD;
^~~~~~~~
horses.cpp:132:38: note: suggested alternative: 'si_value'
return solve(1,1,N,1,maxLoc[1]) * Y[maxValue[1]] % MOD;
^~~~~~~~
si_value