@rajarshi_basu Thanks a lot! After using set, i am able to get partially correct answer. However, after using counting sort i am still getting TLE for subtask 2.
Link to the modified code: Tree Difference - May Lunchtime codechef - Pastebin.com
@rajarshi_basu Thanks a lot! After using set, i am able to get partially correct answer. However, after using counting sort i am still getting TLE for subtask 2.
Link to the modified code: Tree Difference - May Lunchtime codechef - Pastebin.com