Блог пользователя sixth_mancity_fan

Автор sixth_mancity_fan, история, 3 месяца назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится