Choosing a Pub

Time limit1sMemory limit128 MB

Problem

After class, a group of students decides which pub to go to together by voting. There are $n$ pubs, numbered from $1$ to $n$.

The students are of two kinds:

  • Leading students: each has one pub they definitely prefer and always vote for it. Several leading students may vote for the same pub. After all leading students have voted, the number of votes pub $i$ has received is $a_i$.
  • Non-leading students: the remaining students vote probabilistically, following the crowd. They vote one at a time; the probability that the student currently voting chooses pub $i$ equals (the number of votes pub $i$ has so far) / (the total number of votes cast so far).

Once every student has voted, the pub with the most votes is chosen. If several pubs are tied for the most votes, one of them is chosen uniformly at random.

For example, suppose there are seven students and three pubs, and five of the students are leading. If the leading students' votes give the tally $(3, 1, 1)$, then two non-leading students still have to vote.

The first student chooses pub $1$ with probability $3/5$ and pubs $2$ and $3$ each with probability $1/5$. If this student chooses pub $3$, the tally becomes $(3, 1, 2)$. The second student then chooses pub $1$ with probability $3/6$, pub $2$ with probability $1/6$, and pub $3$ with probability $2/6$. If this student also chooses pub $3$, the tally becomes $(3, 1, 3)$; pubs $1$ and $3$ have the same number of votes, so each of them is chosen with probability $1/2$.

Given the number of pubs, the number of students, and the votes each pub received after the leading students voted, write a program that computes the probability that each pub is finally chosen.

Input

The input consists of several test cases. Process each test case until the end of input.

The first line of each test case contains the number of pubs $n$ ($1 \le n \le 5$) and the number of students $k$ ($1 \le k \le 50$). The second line contains the votes $a_1, a_2, \ldots, a_n$ that each pub received after the leading students voted. Each $a_i$ is at least $0$, and it always holds that $\sum_{i=1}^{n} a_i \le k$. Moreover, at least one vote has been cast, so $\sum_{i=1}^{n} a_i \ge 1$. The number of non-leading students among the $k$ students is $k - \sum_{i=1}^{n} a_i$.

Output

For each test case, print the probability that each pub is chosen, one per line, for pubs $1$ through $n$ in order. Each line has the form pub i: p %, where $i$ is the pub number and $p$ is the probability expressed as a percentage.

The value $p$ is (probability $\times 100$) rounded to two decimal places by rounding the third decimal digit. Rounding uses the round-half-up rule (a digit of exactly $5$ rounds up), and exactly two digits after the decimal point are always shown (for example, 100.00, 0.00). The outputs of consecutive test cases are printed one after another with no blank line between them.