ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1709. Penguin-Avia

Hint
Posted by Frankey 26 Jul 2009 21:26
This is very easy problem. You can use:
1) BFS or DFS to find the components of the graph;
2) Prim or Kruskal algo for minimum spanning tree.