hugo_cabral's blog

By hugo_cabral, history, 9 years ago, In English

I hate get TLE, but today it was really strange, I'm wondering what's the difference between this two submissions? can someone explain to me? 11558989 and 11558846

ps: the position of the boolean makes no difference, still TLE

sorry my bad english, and I hope this can be helpful to others users too

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

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

b1 is uninitialized in the second submission. If you can't make any copies of either substring in the first string, b1 will never be set inside the while loop, and the output will be garbage.