Help with problem about Graph Theory

Правка en2, от Masterkaiba, 2017-09-21 07:01:14

Hello all, So I came across this problem about Graph Theory and I am still not sure on how to solve this. https://vjudge.net/contest/78376#problem/B

I tried thinking about MST however what to do if in the final solution there are more than the number of connected components? MST will be taking the whole graph as a single component.

If talking about MST then, I think Kruskal might work, but not Prim. Am I right?

Теги graph, graph theory

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Masterkaiba 2017-09-21 07:01:14 84
en1 Английский Masterkaiba 2017-09-21 06:57:27 374 Initial revision (published)