I was doing the problem Bandit in a city. My submission used binary search to find the answer and check it. The problem arises for cases with answer 0 the code gave TLE on test 7. On using max() instead of + this code passed in 953 ms. I had to check for the corner case because the initial binary search code also gave TLE on test 7. I could not find anything to explain these. Is addition on long long integers slower than using max.
That's actually just luck. When you submit the same solution you can get a bit different time because of some server conditions.
I submitted your OK solution and got TL7
https://codeforces.me/contest/1436/submission/264584086
Thanks, I understand now