Segment Tree With Trees?

Правка en3, от stillcoding, 2015-11-05 22:43:00

Hello Codeforces

I want to represent (Tree) inside Segment Tree.

For Example: Given Tree, There are two queries:

1 — Change all the vertices value on the path from (u — v) by x.

2 — Calculate the sum for the vertices value on the path from (u — v) and print it.

I have no idea how to represent the tree inside the segment tree, any ideas?

Теги segment tree, #trees

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский stillcoding 2015-11-05 22:43:00 4 Tiny change: ') by x._\n__\n\n\n_2 ' -> ') by x._\n\n\n_2 '
en2 Английский stillcoding 2015-11-05 22:42:27 4 Tiny change: ' x._\n__\n_2 &mdas' -> ' x._\n__\n\n\n_2 &mdas'
en1 Английский stillcoding 2015-11-05 22:41:49 417 Initial revision (published)