#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const long long SZ = 27, SSZ = 0, APB = 26, one = 93, INF = 0x7FFFFFF,
                mod = 1000000007;
long long n, knum;
double src[SZ], arr[SZ], dp[1 << 20];
double ans[SZ];
void init() {
  cin >> n >> knum;
  int sz = 0LL;
  for (int i = 1; i <= n; ++i) {
    cin >> src[i];
    if (src[i] > EPS) arr[sz++] = src[i];
  }
  if (sz <= knum) {
    for (int i = 1; i <= n; ++i) {
      if (src[i] < EPS)
        cout << 0 << " ";
      else
        cout << 1 << " ";
    }
  } else {
    dp[0] = 1;
    for (int i = 0; i < (1 << sz); ++i) {
      if (__builtin_popcount(i) > knum) continue;
      double sum = 0;
      for (int j = 0; j < sz; ++j) {
        if (!(i & (1 << j))) sum += arr[j];
      }
      for (int j = 0; j < sz; ++j) {
        if (!(i & (1 << j))) dp[i | (1 << j)] += arr[j] / sum * dp[i];
      }
      for (int j = 0; j < sz; ++j) {
        if (i & (1 << j))
          if (__builtin_popcount(i) == knum) ans[j] += dp[i];
      }
    }
    sz = 0;
    for (int i = 1; i <= n; ++i) {
      if (src[i] < EPS)
        cout << 0 << " ";
      else
        cout << fixed << setprecision(10) << ans[sz++] << " ";
    }
  }
}
void work() {}
int main() {
  std::ios::sync_with_stdio(0);
  long long casenum;
  {
    init();
    work();
  }
  return 0;
}
