Problem Idea #5

Given a tree with N(<= 1e5) nodes where each edge has an associated cost. find the longest path with cost <= k(<= 1e6). solution : http://pastebin.com/XSqsufpa