Zzyzx's blog

By Zzyzx, 10 years ago, In English

I've been trying to understand where my code for Problem B of the round 203 is eating up so much memory. Still haven't found it.

http://codeforces.com/contest/350/submission/4633434

Would be great if anyone could help me in finding it.

Thanks in advance!

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

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

cycling dfs. memory used for stack. cycle in the graph.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, you are right.

    Such a trivial mistake. Just added a vis[] array and now everything works fine.

    Thanks :)