help in TALCA problem in JULY LUNCHTIME for getting 20 points

help
dfs
lunchtime
talca

#1

http://discuss.codechef.com/questions/48548/talca-editorial

In the editorial given to calculate the in_time and out_time for each node by doing dfs from root. ok!! after calculating them how to get answer? plz help me… i’m stuck there… plzzzz