solve AOJ/2224
modify template/Kruskal.cpp
solve POJ/1258 by Kruskal