Problem on A Tree — Hackerrank 101 Hack 42

Revision en2, by rachitiitr, 2016-11-04 00:01:55

Hello Codeforces Community,
I found this problem very interesting, but couldn't solve it. Also the editorial wasn't clear to me. What I was trying was a greedy solution that passed half of the test cases.

Problem Tags: Trees, dsu
Could someone explain it in a better way?
Thanks!

Tags #trees, #dsu

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rachitiitr 2016-11-04 00:01:55 49
en1 English rachitiitr 2016-11-04 00:01:16 365 Initial revision (published)