#include #include #include #include using namespace std; #define MaxN 200 #define eps 1e-8 double dp[MaxN+5][MaxN+5]; double tmp[MaxN+5][MaxN+5]; int n; int c; int m; int lst[MaxN+5]; void floyd(bool flag){ int i,j,k; if (flag){ for (k=0;k=0 && dp[k][j]>=0 && (dp[i][j]<0 || dp[i][j]>dp[i][k]+dp[k][j])){ dp[i][j]=dp[i][k]+dp[k][j]; } } } } } bool iszero(double a) { return a