Code not working for 10^6 or more

time complexity of this code is logn acc to me but it doesnt work for 10^6 or more on compiler…why>>

@S19LPPP0202
What are you trying to accomplish here? Please send the question link.

it shows tle on submission …i dont know why for 10^6 or more …
i have done the logic on my own…

https://www.codechef.com/SEPT20B/problems/CHFNSWAP

@S19LPPP0202
Will tell you of the approach after the contest ends.


thsi is my latest submission shows tle for only 1 casee…plz look into this and it works for 10^9 as well…

@S19LPPP0202
Will get back to you asap.

now plz tell me tha ans …its been already 1 day… reply fast…

When will u reply …why can’t u just clear the doubt

@S19LPPP0202
I am unable to understand your thought process. Can you walk me through it once?