Safety in Numbers (Small)

Each contestant needs the smallest audience vote share that keeps them from ever finishing as the single lowest scorer.

Medium6Binary searchMathNo attempts yetTime limit5sMemory limit512 MB

Problem

A reality TV show has NN contestants. The judges give contestant ii an integer score sis_i. The audience then splits its vote among the contestants: contestant ii takes a fraction yiy_i of the audience vote, every yiy_i is between 0 and 1 inclusive, and y0+y1++yN1=1y_0 + y_1 + \dots + y_{N-1} = 1.

Let X=s0+s1++sN1X = s_0 + s_1 + \dots + s_{N-1}. The final score of contestant ii is si+Xyis_i + X y_i.

The contestant with the lowest final score is eliminated. If two or more contestants tie for the lowest final score, nobody is eliminated.

Contestant ii is safe at a given yiy_i when no way of splitting the remaining 1yi1 - y_i of the audience vote among the other contestants eliminates contestant ii. For each contestant, find the smallest yiy_i that makes the contestant safe, written as a percentage.

Input

The first line has one integer TT, the number of test cases. Each of the next TT lines holds one test case: the number of contestants NN, then NN integers s0,s1,,sN1s_0, s_1, \dots, s_{N-1}, all separated by single spaces. The integer sis_i is the score the judges gave contestant ii.

Limits

  • 1T201 \le T \le 20
  • 2N102 \le N \le 10
  • 0si1000 \le s_i \le 100
  • si>0s_i > 0 for at least one ii, so X>0X > 0.

Output

For each test case print one line: Case #x: followed by NN numbers m0,m1,,mN1m_0, m_1, \dots, m_{N-1} separated by single spaces. Here xx is the case number starting from 1, and mim_i is the smallest percentage of the audience vote that makes contestant ii safe.

Print each mim_i with exactly six digits after the decimal point, rounding a value that lands exactly halfway upward. Every mim_i is a rational number, and no test case has an answer sitting on a rounding boundary, so ordinary fixed-point printing of a correctly computed answer matches.