// Reads a weighted, directed graph from a file and // then uses Sedgewick's code for sparse MST (Prim's alg) import java.util.Scanner; public class MSTfile { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int v=sc.nextInt(); int e=sc.nextInt(); Graph G=new Graph(v,false); for (int i=0;i