{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eDreamGrid is the keeper of $$$n$$$ rabbits. Initially, the $$$i$$$-th ($$$1 \\le i \\le n$$$) rabbit has a weight of $$$w_i$$$. \u003c/p\u003e\u003cp\u003eEvery morning, DreamGrid gives the rabbits a carrot of weight $$$1$$$ and the rabbits fight for the only carrot. Only one rabbit wins the fight and eats the carrot. After that, the winner\u0027s weight increases by $$$1$$$. The whole process of fighting and eating ends before the next morning.\u003c/p\u003e\u003cp\u003eDreamGrid finds that the heavier a rabbit is, the easier it is to win a fight. Formally, if the weights of the rabbits are $$$w_1\u0027, w_2\u0027, \\dots, w_n\u0027$$$ before a fight, the probability that the $$$i$$$-th rabbit wins the fight is $$$$$$\\frac{w_i\u0027}{\\sum\\limits_{j\u003d1}^{n}{w_j\u0027}}$$$$$$ He wants to know the expected weight of every rabbit after $$$k$$$ days ($$$k$$$ carrots are given and eaten).\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input contains multiple cases. The first line of the input contains a single integer $$$T\\ (1 \\le T \\le 10^5)$$$, the number of cases.\u003c/p\u003e\u003cp\u003eFor each case, the first line of the input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\leq n \\leq 10^{5}, 1 \\leq k \\leq 10^{9}$$$). The second line contains $$$n$$$ integers $$$w_1, w_2, \\dots, w_n$$$ ($$$1 \\le i \\le n, 1 \\leq w_i \\leq 10^{9}$$$).\u003c/p\u003e\u003cp\u003eIt\u0027s guaranteed that the sum of $$$n$$$ over all cases doesn\u0027t exceed $$$10^6$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each case, print a single line containing $$$n$$$ space-separated real numbers, where the $$$i$$$-th ($$$1 \\le i \\le n$$$) number should be equal to the expected weight of the $$$i$$$-th rabbit after $$$k$$$ days.\u003c/p\u003e\u003cp\u003eYour answer will be considered correct if the absolute or relative error does not exceed $$$10^{-4}$$$.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n1 1\n2\n2 2\n1 3\n3 2\n1 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3.00000000\n1.50000000 4.50000000\n1.66666667 1.66666667 1.66666667\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}