public static void main(String[] args)
	{
		EdgeWeightedDigraph G = new EdgeWeightedDigraph(new In(args[0]));
		int s = Integer.parseInt(args[1]);
		BellmanFordSP sp = new BellmanFordSP(G, s);

		if (!sp.hasNegativeCycle())
		{
			for (int t = 0; t < G.V(); t++)
			{
				System.out.print(s + " to " + t + " ("
						+ String.format("%.2f", sp.distTo(t)) + ") : ");
				if (sp.hasPathTo(t))
					for (WeightedDirectedEdge e : sp.pathTo(t))
						System.out.print(e + "  ");
				System.out.println();
			}
		}
		else
		{
			System.out.println("Graph has a negative cycle reachable from " + s
					+ ". Can't find the shortest path tree");
			for (int v : sp.negativeCycle())
				System.out.println(v);
		}
	}