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

Автор idonthatephy, история, 4 года назад, По-английски

I have seen people use binary search in this particular problem 1443C - The Delivery Dilemma but my submission is getting TLE in testcase 9 166040767 Can anyone explain why is that? for example this binary search solution passed 97454890

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

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Here is your corrected submision. Reason for TLE is passing the whole vector to function (in brief: every time you pass vector to function, you make his copy, and it's ineffective) instead of passing only his reference.