APRIL14 BINTREE

http://www.codechef.com/APRIL14/problems/BINTREE