Блог пользователя dx24816

Автор dx24816, история, 6 лет назад, По-английски

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

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

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

»
6 лет назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

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?