B3Natural's blog

By B3Natural, history, 6 years ago, In English

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

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

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

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).