#include<bits/stdc++.h> #define EPS 1e-7 #define MAX_N 500 #define MAX_M 250000 usingnamespace std; typedefdouble dnt; template <classT> inlinevoidread(T &x){ x = 0; int c = getchar(), f = 1; for (; !isdigit(c); c = getchar()) if (c == 45) f = -1; for (; isdigit(c); c = getchar()) (x *= 10) += f*(c-'0'); } int n, m, u[MAX_M+5], v[MAX_M+5], d[MAX_N+5]; dnt f[MAX_N+5][MAX_N+5], x[MAX_N+5], y[MAX_M+5]; voidGauss(){ for (int i = 1, t; i <= n; i++) { for (t = i; t <= n; t++) if (fabs(f[i][t]) >= EPS) break; if (t > n) continue; swap(f[i], f[t]); for (int j = 1; j <= n; j++) if (i^j) { dnt div = f[j][i]/f[i][i]; for (int k = 1; k <= n+1; k++) f[j][k] -= f[i][k]*div; } } for (int i = 1; i <= n; i++) x[i] = f[i][n+1]/f[i][i]; } intmain(){ read(n), read(m); dnt ans = 0; for (int i = 1; i <= m; i++) read(u[i]), read(v[i]), d[u[i]]++, d[v[i]]++; for (int i = 1; i <= m; i++) f[u[i]][v[i]] -= 1.0/d[v[i]], f[v[i]][u[i]] -= 1.0/d[u[i]]; for (int i = 1; i <= n; i++) f[n][i] = 0; for (int i = 1; i <= n; i++) f[i][i] = 1; f[1][n+1] = 1, Gauss(); for (int i = 1; i <= m; i++) y[i] = x[u[i]]/d[u[i]]+x[v[i]]/d[v[i]]; sort(y+1, y+m+1); for (int i = 1; i <= m; i++) ans += y[i]*(m-i+1); returnprintf("%.3lf\n", ans), 0; }