SPTREE - Editorial

can anyone help me in pointing out how the third sub task can help to achieve 60 points?

Can you explain your logic?

@cubefreak777 can you tell me why i am getting TLE I have used same concept given by you.
https://www.codechef.com/viewsolution/45833851