Problem | segmenttree2 |
---|---|
User | personjs |
Submission Time | 2025-02-24 18:55:37 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
segmenttree2.cpp:6:1: error: ‘vector’ does not name a type
6 | vector<long long> tree(5*MAXN);
| ^~~~~~
segmenttree2.cpp:7:1: error: ‘vector’ does not name a type
7 | vector<long long> lazy(5*MAXN);
| ^~~~~~
segmenttree2.cpp: In function ‘void add(int, int, int, int, int, long long int)’:
segmenttree2.cpp:10:5: error: ‘lazy’ was not declared in this scope
10 | if(lazy[node] != 0) {
| ^~~~
segmenttree2.cpp:11:3: error: ‘tree’ was not declared in this scope
11 | tree[node] += (end - start + 1)*lazy[node];
| ^~~~
segmenttree2.cpp:22:3: error: ‘tree’ was not declared in this scope
22 | tree[node] += (end-start+1)*val;
| ^~~~
segmenttree2.cpp:24:4: error: ‘lazy’ was not declared in this scope
24 | lazy[2*node+1] += val;
| ^~~~
segmenttree2.cpp:31:2: error: ‘tree’ was not declared in this scope
31 | tree[node] = tree[2*node+1] + tree[2*node+2]