Link: Arbitrage
This question is pitted, and the loss of precision is severe. If I use the value assignment, all of them will be changed to 0.00. However, I have to lose it in, and I will find the right ring like POJ1860, the code is almost the same, and you can change it slightly, but the accuracy of this question is less than that .... Over water
The shortest-circuit module of the POJ plan has been flushed out, and the shortest-circuit problem is very pitfall. However, the change is to change the update condition of dis.
The Minimum Spanning Tree of POJ is about to begin tomorrow,
ME TI
704Kb 46 Ms
# Include
# Include
# Include
# Include using namespace std; const int N = 50; const int M = 1010; char a [N] [N], s [N]; double dis [N]; int n, m, num; struct node {int u, v; double w;} edge [M]; int Bellman (int x) {dis [x] = 1.0; // when it is leaked at the beginning, NO for (int I = 0; I