RakibJoy's blog

By RakibJoy, history, 19 months ago, In English

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.

  • Vote: I like it
  • +6
  • Vote: I do not like it

| Write comment?
»
19 months ago, # |
  Vote: I like it +8 Vote: I do not like it

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.