Problem historical
User dacashew
Submission Time 2024-03-12 18:01:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

historical.cpp:107:14: error: array bound is not an integer constant before ‘]’ token
107 | int tr[4*NMAX];
| ^
historical.cpp: In function ‘void update(long long int, long long int)’:
historical.cpp:110:2: error: ‘tr’ was not declared in this scope; did you mean ‘tm’?
110 | tr[i]+=x;
| ^~
| tm
historical.cpp: In function ‘long long int query(long long int, long long int)’:
historical.cpp:120:23: error: ‘tr’ was not declared in this scope; did you mean ‘r’?
120 | if(l&1) ans=max(ans,tr[l++]);
| ^~
| r
historical.cpp:121:23: error: ‘tr’ was not declared in this scope; did you mean ‘r’?
121 | if(r&1) ans=max(ans,tr[--r]);
| ^~
| r