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.net/contest/350/submission/4633434
Would be great if anyone could help me in finding it.
Thanks in advance!
cycling dfs. memory used for stack. cycle in the graph.
Yes, you are right.
Such a trivial mistake. Just added a vis[] array and now everything works fine.
Thanks :)