I am solving this problem of dsu I know the approach but getting tle in some of the test cases!!
I checked the Editorial they have used the same approach!!
Can anyone explain why I m getting TLE!!
my code link: https://ideone.com/NZdlki
THANKS IN ADVANCE!!