Блог пользователя abc_fx

Автор abc_fx, история, 5 лет назад, По-английски

I am trying to solve following tree problem but i am unable to understand a statement "**Select the subtree of the given tree that includes the vertex with number 1**" .What does it mean ?? if we select a subtree by including root node always then only one subtree is possible ?? is not it ?? Any help would be appreciated. https://codeforces.me/contest/274/problem/B

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Not necessary,
if we took the simple
The subtree can be (1) (1,2) (1,3) or (1,2,3)
if we increase subtree (1) and (1,2) then we decrease subtree (1,3) all vi will be equals to zero
thus the answer is 3