burtmacklin's blog

By burtmacklin, history, 4 years ago, In English

Hi,

I am getting TLE at test case 6. I have added documentation to improve readability.

Things I have tried:

  1. Check for infinite loops : Not possible since I am keeping track of every node visited.
  2. Check time complexity : It is O(n), which should be enough for 2 second limit.
  3. Replace cin and cout with scanf and printf : Didn't work.

Thanks

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it