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: NZdlki - Online C++ Compiler & Debugging Tool - Ideone.com
THANKS IN ADVANCE!!