func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 405;   double f[maxn], g[maxn], ans;   int n, m, dis[maxn][maxn], q[maxn];   int main() {     scanf( %d%d , &n, &m);     memset(dis, 127 / 3, sizeof(dis));     for (int i = 1; i <= n; i++) {       dis[i][i] = 0;     }     for (int i = 1; i <= m; i++) {       int u, v;       scanf( %d%d , &u, &v);       dis[u][v] = dis[v][u] = 1;     }     for (int k = 1; k <= n; k++) {       for (int i = 1; i <= n; i++) {         for (int j = 1; j <= n; j++) {           dis[i][j] = min(dis[i][j], dis[i][k] + dis[k][j]);         }       }     }     for (int i = 1; i <= n; i++) {       double temp = 0;       for (int j = 0; j < n; j++) {         int u = 0;         memset(f, 0, sizeof(f));         for (int k = 1; k <= n; k++) {           if (dis[i][k] == j) {             u++;             int x = 0;             for (int kk = 1; kk <= n; kk++) {               if (dis[k][kk] == 1) {                 x++;               }             }             for (int kk = 1; kk <= n; kk++) {               if (dis[k][kk] == 1) {                 f[kk] += 1.0 / x;               }             }           }         }         int v = 0;         for (int k = 1; k <= n; k++) {           if (abs(dis[i][k] - j) <= 1) {             q[++v] = k;           }         }         double res = 0;         for (int k = 1; k <= n; k++) {           for (int kk = 1; kk <= v; kk++) {             if (f[q[kk]] > g[dis[k][q[kk]]]) {               g[dis[k][q[kk]]] = f[q[kk]];             }           }           double w = 0;           for (int kk = 1; kk <= v; kk++) {             w += g[dis[k][q[kk]]];             g[dis[k][q[kk]]] = 0;           }           res = max(res, w);         }         if (u) {           res = max(res, 1.0);         }         temp += res / n;       }       ans = max(ans, temp);     }     printf( %.12lf n , ans);     return 0;   }   