0_0_21684091_2766.cpp: In function 'void build(int&, int, int)':
0_0_21684091_2766.cpp:18:5: error: 'sum' was not declared in this scope
sum[rt] = sz[rt] = 0;
^
0_0_21684091_2766.cpp:18:15: error: 'sz' was not declared in this scope
sum[rt] = sz[rt] = 0;
^
0_0_21684091_2766.cpp:21:11: error: 'ls' was not declared in this scope
build(ls[rt], l, mid);
^
0_0_21684091_2766.cpp:22:11: error: 'rs' was not declared in this scope
build(rs[rt], mid+1, r);
^
0_0_21684091_2766.cpp: In function 'void update(int, int&, int, int)':
0_0_21684091_2766.cpp:27:5: error: 'sum' was not declared in this scope
sum[rt] += v; sz[rt] += c;
^
0_0_21684091_2766.cpp:27:19: error: 'sz' was not declared in this scope
sum[rt] += v; sz[rt] += c;
^
0_0_21684091_2766.cpp:28:8: error: expected primary-expression before ')' token
if()
^
0_0_21684091_2766.cpp:29:1: error: expected primary-expression before '}' token
}
^
0_0_21684091_2766.cpp: In function 'int main()':
0_0_21684091_2766.cpp:46:15: error: 'root' was not declared in this scope
build(root[0], 1, 100000);
^
0_0_21684091_2766.cpp:62:46: error: 'query' was not declared in this scope
printf("%lld\n", query(root[x], k));
^
|