Can anybody help me ? https://www.codechef.com/START4B/problems/SUBCENTR

Contest: Contest Page | CodeChef
(May CodeChef Starters 2021)

Problem :CodeChef: Practical coding for everyone
Can anybody please help me why my code is giving TLE?

LCA concept: LCA in a tree using Binary Lifting Technique - GeeksforGeeks
And rest concept of Editorialsit’s solutions
Editorial: SUBCENTR - Editorial

Code: CodeChef: Practical coding for everyone

Thanks in advance