Codechef Long Challenge problem DISTNUM3

Правка en2, от rhezo, 2017-02-19 18:13:38

How to solve this problem?

Statement: Given N nodes of a tree, answer Q queries of 2 types(update value of some node or find the number of distinct numbers on the path from U to V).

There is a solution with Mo's algorithm with updates and I don't understand that as well. Can anyone explain any other approach or even this one?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский rhezo 2017-02-19 18:13:38 10
en1 Английский rhezo 2017-02-19 18:13:04 425 Initial revision (published)