func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   double a[22][22], p[20][(1 << 18) + 10], pc[(1 << 18) + 10],       sm[20][(1 << 18) + 10];   int main() {     while (scanf( %d , &n) != EOF) {       for (int i = 0; i < n; i++)         for (int j = 0; j < n; j++) {           scanf( %lf , &a[i][j]);         }       memset(sm, 0, sizeof(sm));       for (int mask = 0; mask < (1 << n); mask++) {         pc[mask] = 0.0;         for (int bit = 0; bit < n; bit++) {           if (mask & (1 << bit)) {             pc[mask]++;             for (int cara = 0; cara < n; cara++) {               sm[cara][mask] += a[bit][cara];             }           }         }       }       for (int niv = 0; niv < n; niv++) {         for (int mask = 0; mask < (1 << n); mask++) {           if (niv == 0) {             if (mask == ((1 << n) - 1)) {               p[niv][mask] = 1.0;             } else {               p[niv][mask] = 0.0;             }           } else {             double sum = 0.0;             for (int bit = 0; bit < n; bit++) {               if ((mask & (1 << bit)) == 0) {                 sum += p[niv - 1][mask | (1 << bit)] * sm[bit][mask];               }             }             p[niv][mask] = 2.0 * sum / (pc[mask] * (pc[mask] + 1));           }         }       }       for (int i = 0; i < n; i++) {         printf( %lf%c , p[n - 1][1 << i],    n [i == (n - 1)]);       }     }     return 0;   }   