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

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

I am trying with Articulation point + Kruskal.... Imperial roads That's why my code becomes so large and i can't fix bug. Is there any other approach? Or give me corner case for my code

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

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

Find any MST, then if road in query is not in MST, you need to find maximum cost edge on path from x to lca(x, y) and from y to lca(x, y).