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

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

Please look at my two submissions.

204540477 204540870

My question is why I am getting TLE in my second submission?

The only difference between these submissions is given in the picture.

As far as I know, the complexity of the upper bound doesn't depend on the value.

Please Help.

Thanks in advance.

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

»
19 месяцев назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

This rather seems like an RTE. Your pw array is sized 26 and bs = 25, hence j + 2 can be max 26 which is out of bounds for pw, hence RTE.

When an RTE happens, it is actually an Undefined behavior, which can result in any type of judgment -> TLE in this case.