Hello codeforces community, I am getting a weird TLE on this problem: https://codeforces.net/contest/1932/problem/E
Here is my code submission : https://codeforces.net/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