func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, ta;   long double x[1005][1005], tb, tc, td;   vector<int> y;   vector<long double> z;   bool used[1005];   int main() {     scanf( %d , &n);     for (int a = 0; a < n; a++)       for (int b = 0; b < n; b++) {         scanf( %d , &ta);         x[a][b] = ta;         x[a][b] /= 100;       }     y.push_back(n - 1);     z.push_back(0);     used[n - 1] = 1;     while (y.back() != 0) {       ta = -1;       for (int a = 0; a < n; a++)         if (!used[a]) {           tb = 0;           tc = 1;           for (int b = 0; b < y.size(); b++) {             tb += (z[b] + 1) * tc * x[a][y[b]];             tc *= 1 - x[a][y[b]];           }           if (abs(tc - 1) < 1e-11) continue;           tb = (tb + tc) / (1 - tc);           if (ta == -1 || tb < td) {             ta = a;             td = tb;           }         }       y.push_back(ta);       z.push_back(td);       for (int a = z.size() - 1; a >= 1; a--) {         if (z[a] >= z[a - 1]) break;         swap(z[a], z[a - 1]);         swap(y[a], y[a - 1]);       }       used[ta] = 1;     }     printf( %.15lf n , (double)z.back());     return 0;   }   