kelvin_0179's blog

By kelvin_0179, history, 3 years ago, In English

My Solution to the Problem of Round #749 D is giving TLE on a very small test , though it could be an infinite loop , I cross checked on my PC and custom test on Codeforces and it runs fine for the same test.

If anyone could tell me what this is , I would be really grateful !!

Thanks a Lot !

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

»
3 years ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

Hey, I encountered a similar problem, but on test 2. Just writing this comment to not lose your post and check it if someone explains the reason:)

UPD: I've also written similar post with submission link: https://mirror.codeforces.com/blog/entry/96081

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Thanks for the reply , I was stuck on this for 40 mins but found nothing. I will not be able to sleep tonight lol

»
3 years ago, # |
  Vote: I like it +12 Vote: I do not like it

Similar to my comment here, it is visible from the custom test that your code violates the constraint $$$1 \leq a_i \leq n$$$.