Tree tearing

Problem Name:
Tree tearing
Site:HackerEarth
Links:
Tags:
Problem setters: