dx24816's blog

By dx24816, history, 6 years ago, In English

Hello,

I was trying to do the problem pushabox (http://usaco.org/index.php?page=viewproblem2&cpid=769) with biconnected components, and I think my biconnected components algorithm is right, but for some reason my code is producing the wrong answer on test cases 5-15. I have commented my code so it is easy to understand my logic. Can somebody help me figure out where my logical error is? Thanks!

Code: https://ideone.com/SU9VU8

-dx24816

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

»
6 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Auto comment: topic has been updated by dx24816 (previous revision, new revision, compare).

»
6 years ago, # |
  Vote: I like it +4 Vote: I do not like it

I think the error might be in the bfs, but I'm not entirely sure. If someone has a valid code, could you share it and explain how you did this problem?