#include <bits/stdc++.h>
using namespace std;
const int maxn = 20;
double a[maxn];
int cnt[maxn];
double sum[1 << maxn];
double dp[1 << maxn];
int cc[1 << maxn];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i <= n; i++) cnt[i] = 1 << i;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &a[i]);
  }
  int p = 1 << n;
  for (int i = 1; i < p; i++) cc[i] = cc[i & (i - 1)] + 1;
  for (int i = 0; i < p; i++) {
    for (int j = 0; j < n; j++) {
      if (i & cnt[j]) {
        sum[i] += a[j];
      }
    }
  }
  for (int i = 1; i < p; i++) {
    if (cc[i] >= k) continue;
    if (cc[i] == 1) {
      if (sum[i] != 1)
        dp[i] = sum[i] / (1 - sum[i]);
      else
        dp[i] = 1;
    } else {
      double s = 0;
      for (int j = 0; j < n; j++) {
        if (i & cnt[j]) {
          dp[i] += a[j] * dp[i ^ cnt[j]];
          s += a[j];
        }
      }
      if (s != 1)
        dp[i] /= (1 - s);
      else
        dp[i] = 1;
    }
  }
  for (int i = 0; i < n; i++) {
    long double s = 1;
    for (int j = 0; j < p; j++) {
      if ((j & cnt[i]) == 0) {
        if (cc[j] < k) {
          s += dp[j];
        }
      }
    }
    printf("%.14lf ", (double)(s * a[i]));
  }
}
