Hello,↵
↵
Can someone explain the solution to USACO newbarn (Problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=817, Solution: ↵
http://www.usaco.org/current/data/sol_newbarn_platinum_feb18.html)? I don't understand what his variables names mean, like tree[c].top, tid, etc. Can someone explain what all of his variables mean and how each part of his program works, including his centroid decomposition? Thanks!↵
↵
Edit: OK, if anyone has a centroid decomposition solution that's not the official solution (I can't understand how the checking for the same subtree idea works), can you post it and explain it in depth? Also, when you're talking about trees and childs, can you distinguish between children on the actual tree or the centroid tree?↵
↵
-dx24816
↵
Can someone explain the solution to USACO newbarn (Problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=817, Solution: ↵
http://www.usaco.org/current/data/sol_newbarn_platinum_feb18.html)? I don't understand what his variables names mean, like tree[c].top, tid, etc. Can someone explain what all of his variables mean and how each part of his program works, including his centroid decomposition? Thanks!↵
↵
Edit: OK, if anyone has a centroid decomposition solution that's not the official solution (I can't understand how the checking for the same subtree idea works), can you post it and explain it in depth? Also, when you're talking about trees and childs, can you distinguish between children on the actual tree or the centroid tree?↵
↵
-dx24816