import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
n = int(input())
a = [list(map(float, input().split())) for _ in range(n)]
pow2 = [1]
for _ in range(n):
pow2.append(2 * pow2[-1])
m = pow2[n]
dp = [0] * m
dp[-1] = 1
for i in range(m - 1, 0, -1):
x = []
for j in range(n):
if i & pow2[j]:
x.append(j)
u = len(x) * (len(x) - 1) // 2
if not u or not dp[i]:
continue
dpi = dp[i]
for j in x:
aj = a[j]
for k in x:
if j == k:
continue
l = i ^ pow2[k]
dp[l] += dpi * aj[k] / u
ans = [dp[i] for i in pow2[:-1]]
sys.stdout.write(" ".join(map(str, ans)))
#include <bits/stdc++.h>
using namespace std;
#define scd(t) scanf("%d", &t)
#define scld(t) scanf("%ld", &t)
#define sclld(t) scanf("%lld", &t)
#define scc(t) scanf("%c", &t)
#define scs(t) scanf("%s", t)
#define scf(t) scanf("%f", &t)
#define sclf(t) scanf("%lf", &t)
#define forr(i, j, k) for (int i = j; i < k; i++)
#define frange(i, j) forr(i, 0, j)
#define all(cont) cont.begin(), cont.end()
#define mp make_pair
#define pb push_back
#define f first
#define s second
typedef long int li;
typedef unsigned long int uli;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<lli> vll;
typedef vector<string> vs;
typedef vector<pii> vii;
typedef vector<vi> vvi;
typedef map<int, int> mpii;
typedef set<int> seti;
typedef multiset<int> mseti;
typedef long double ld;
int main()
{
int n;
scd(n);
vector<vector<ld>> vec(n, vector<ld>(n));
frange(i, n)
{
frange(j, n)
{
cin >> vec[i][j];
}
}
vector<ld> dp(1 << n, 0);
frange(i, n)
{
dp[(1 << n) - 1] = 1;
}
for (int i = (1 << n) - 2; i >= 1; i--)
{
int k = __builtin_popcount(i) + 1;
ld c = ld(k * ld(k - 1)) / 2;
frange(j, n)
{
if (i & (1 << j))
{
frange(l, n)
{
if ((i & (1 << l)) == 0)
{
dp[i] += dp[i ^ (1 << l)] * vec[j][l] / c;
}
}
}
}
}
// frange(i, (1 << n))
// {
// frange(j, n)
// {
// cout << dp[i][j] << " ";
// }
// cout << "\n";
// }
cout << setprecision(6);
frange(i, n)
{
cout << dp[1 << i] << " ";
}
}
1569C - Jury Meeting | 108A - Palindromic Times |
46A - Ball Game | 114A - Cifera |
776A - A Serial Killer | 25B - Phone numbers |
1633C - Kill the Monster | 1611A - Make Even |
1030B - Vasya and Cornfield | 1631A - Min Max Swap |
1296B - Food Buying | 133A - HQ9+ |
1650D - Twist the Permutation | 1209A - Paint the Numbers |
1234A - Equalize Prices Again | 1613A - Long Comparison |
1624B - Make AP | 660B - Seating On Bus |
405A - Gravity Flip | 499B - Lecture |
709A - Juicer | 1358C - Celex Update |
1466B - Last minute enhancements | 450B - Jzzhu and Sequences |
1582C - Grandma Capa Knits a Scarf | 492A - Vanya and Cubes |
217A - Ice Skating | 270A - Fancy Fence |
181A - Series of Crimes | 1638A - Reverse |