333
правки
Изменения
→query
'''return''' tree[node].ans <tex>\odot</tex> tree[node].d;
push(node);
T ans = get_ans query (node * 2 + 1, a, b) <tex>\oplus</tex> get_ans query (node * 2 + 2, a, b));
tree[node].ans = (tree[2 * node + 1].ans <tex>\odot</tex> tree[2 * node + 1].d) <tex>\oplus</tex>
(tree[2 * node + 2].ans <tex>\odot</tex> tree[2 * node + 2].d);