0_0_33741976_23297.cpp:48:8: error: redefinition of 'struct node'
struct node {
^
0_0_33741976_23297.cpp:13:8: error: previous definition of 'struct node'
struct node {
^
0_0_33741976_23297.cpp:50:12: error: invalid type in declaration before ';' token
} t[N * 24];
^
0_0_33741976_23297.cpp: In function 'void build(int, int, int&)':
0_0_33741976_23297.cpp:55:10: error: request for member 'val' in 't[x]', which is of non-class type 'int'
t[x].val = 0;
^
0_0_33741976_23297.cpp:58:22: error: request for member 'l' in 't[x]', which is of non-class type 'int'
build(l, m, t[x].l);
^
0_0_33741976_23297.cpp:59:26: error: request for member 'r' in 't[x]', which is of non-class type 'int'
build(m + 1, r, t[x].r);
^
0_0_33741976_23297.cpp: In function 'void update(int, int, int&, int, int)':
0_0_33741976_23297.cpp:63:29: error: request for member 'val' in 't[tot]', which is of non-class type 'int'
t[++tot] = t[y], t[tot].val++, x = tot;
^
0_0_33741976_23297.cpp:67:27: error: request for member 'l' in 't[x]', which is of non-class type 'int'
update(l, m, t[x].l, t[y].l, k);
^
0_0_33741976_23297.cpp:67:35: error: request for member 'l' in 't[y]', which is of non-class type 'int'
update(l, m, t[x].l, t[y].l, k);
^
0_0_33741976_23297.cpp:69:31: error: request for member 'r' in 't[x]', which is of non-class type 'int'
update(m + 1, r, t[x].r, t[y].r, k);
^
0_0_33741976_23297.cpp:69:39: error: request for member 'r' in 't[y]', which is of non-class type 'int'
update(m + 1, r, t[x].r, t[y].r, k);
^
0_0_33741976_23297.cpp: In function 'int query1(int, int, int, int, int)':
0_0_33741976_23297.cpp:74:23: error: request for member 'l' in 't[vv]', which is of non-class type 'int'
int sum = t[t[vv].l].val - t[t[uu].l].val;
^
0_0_33741976_23297.cpp:74:40: error: request for member 'l' in 't[uu]', which is of non-class type 'int'
int sum = t[t[vv].l].val - t[t[uu].l].val;
^
0_0_33741976_23297.cpp:80:37: error: request for member 'l' in 't[uu]', which is of non-class type 'int'
return query1(l, mid, t[uu].l, t[vv].l, k);
^
0_0_33741976_23297.cpp:80:46: error: request for member 'l' in 't[vv]', which is of non-class type 'int'
return query1(l, mid, t[uu].l, t[vv].l, k);
^
0_0_33741976_23297.cpp:82:41: error: request for member 'r' in 't[uu]', which is of non-class type 'int'
return query1(mid + 1, r, t[uu].r, t[vv].r, k - sum);
^
0_0_33741976_23297.cpp:82:50: error: request for member 'r' in 't[vv]', which is of non-class type 'int'
return query1(mid + 1, r, t[uu].r, t[vv].r, k - sum);
^
0_0_33741976_23297.cpp: In function 'int query2(int, int, int, int)':
0_0_33741976_23297.cpp:91:36: error: request for member 'l' in 't[x]', which is of non-class type 'int'
return query2(l, mid, t[x].l, k);
^
0_0_33741976_23297.cpp:93:26: error: request for member 'l' in 't[x]', which is of non-class type 'int'
int val = t[t[x].l].val;
^
0_0_33741976_23297.cpp:94:47: error: request for member 'r' in 't[x]', which is of non-class type 'int'
return val += query2(mid + 1, r, t[x].r, k);
^
0_0_33741976_23297.cpp: In function 'int query3(int, int, int, int)':
0_0_33741976_23297.cpp:102:22: error: request for member 'l' in 't[x]', which is of non-class type 'int'
int val = t[t[x].l].val;
^
0_0_33741976_23297.cpp:104:36: error: request for member 'l' in 't[x]', which is of non-class type 'int'
return query3(l, mid, t[x].l, k);
^
0_0_33741976_23297.cpp:106:40: error: request for member 'r' in 't[x]', which is of non-class type 'int'
return query3(mid + 1, r, t[x].r, k - val);
^
|