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://mirror.codeforces.com/contest/1436/submission/264584086
Thanks, I understand now
А чтобы получить OK в двух случаях надо уменьшить границу hi и добавить прагмы. А связанное с сложением и max они работают одинаково. Это просто зависит от сервера , который проверяет ваш код .
Я понимаю, почему люди используют парагму, спасибо.