Hello codeforces community, I am getting a weird TLE on this problem: https://mirror.codeforces.com/contest/1932/problem/E
Here is my code submission : https://mirror.codeforces.com/contest/1932/submission/250505488
I am sure my solution is linear but still I am getting TLE.
I am unable to find the error which is causing TLE. Please help me. Thank you