sam96's blog

By sam96, history, 7 years ago, In English

I have written an O(n) solution using DFS but still i am getting TLE on test number 29. I don't understand why and hence i am unable to resolve the issue. I also tried using fast cin and cout but still i am getting TLE. Here is the link to the problem and link to my solution.

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it