Cut the tree

Problem Name:
Cut the tree
Site:HackerRank
Links:
Tags:
Problem setters: