#include <bits/stdc++.h>
using namespace std;
double cumul[2100000], p[2100000], dp[2100000], ans[50];
int sz[2100000];
int main() {
  int n, m, z = 0;
  cin >> n >> m;
  for (int i = 0; i < (1 << n); i++) {
    cumul[i] = 1;
    dp[i] = 0;
  }
  dp[0] = 1;
  sz[0] = 0;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    if (p[i] - 0.000000001 < 0 && p[i] + 0.0000000001 > 0) z++;
  }
  if (n - z < m) {
    double one = 1;
    for (int i = 0; i < n; i++)
      if (p[i] - 0.000000001 < 0 && p[i] + 0.0000000001 > 0)
        cout << p[i] << " ";
      else
        cout << one << " ";
    return 0;
  }
  for (int mask = 1; mask < (1 << n); mask++) {
    for (int i = 0; i < n; i++) {
      if (mask & (1 << i)) {
        int pmask = (mask ^ (1 << i));
        if (cumul[pmask] + 0.0000000009 > 1 && pmask != 0) {
          for (int j = 0; j < n; j++)
            if (pmask & (1 << j)) cumul[pmask] -= p[j];
        }
        dp[mask] += dp[pmask] * p[i] / cumul[pmask];
        sz[mask] = sz[pmask] + 1;
      }
    }
  }
  memset(ans, 0, sizeof(ans));
  for (int mask = 0; mask < (1 << n); mask++)
    for (int i = 0; i < n; i++)
      if ((mask & (1 << i)) && sz[mask] == m) ans[i] += dp[mask];
  for (int i = 0; i < n; i++) cout << setprecision(12) << ans[i] << " ";
  return 0;
}
