Https://www.codechef.com/viewsolution/45782429 why this solution is getting TLE

https://www.codechef.com/viewsolution/45782429

Reduce The Number Of Loops It Will Not Give TLE
Please Like My Ans

1 Like

Pass the graph by reference to avoid TLE.

2 Likes

thanx

1 Like