Problem1632--Shoot-out

1632: Shoot-out

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

Input

On the first line of the input is a single positive integer t, telling the number of test cases to follow. Each case consists of one line with an integer 2 ≤ n ≤ 13 giving the number of cowboys, followed by n positive integers giving hit percentages for the cowboys in the order of their turns.

Output

For each test case, output one line with the percent probabilities for each of them surviving, in the same order as the input. The numbers should be separated by a space and be correctly rounded to two decimal places.

Sample Input Copy

5
2 1 100
3 100 99 98
3 50 99 100
3 50 99 99
3 50 99 98

Sample Output Copy

1.00 99.00
2.00 0.00 98.00
25.38 74.37 0.25
25.38 49.50 25.12
25.63 24.63 49.74

Source/Category

89