{"trustable":true,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eIt is 23:55 on December 31. Squark is playing Twelve Months.\u003cbr\u003e\u003cbr\u003eTwelve Months is a poker divination game well-known in some regions of China. It is believed to be able to predict one’s luck in each month in the coming year on New Year’s Eve. 48 cards, a standard 52-card deck excluding 4 Kings, are used in the game. First the 48 cards are shuffled randomly and evenly distributed into 12 stacks facedown. Each stack stands for a month, i.e. the first stack stands for January, the second stack stands for February, etc. Then, starting from the first stack, the player repeats the following process until all the cards are opened in the current stack.\u003cbr\u003e\u003cbr\u003e 1.Open the topmost unopened card from the current stack;\u003cbr\u003e\u003cbr\u003e 2.Move to the stack pointed by the number of the card just opened (Ace is the first, Jack is the eleventh and Queen is the twelfth), i.e. the new stack becomes the current stack.\u003cbr\u003e\u003cbr\u003eAccording to the prediction, the player will be lucky in a month if the stack standing for the month is cleared, i.e. all the cards in that stack are opened. Of course, each player can only do the divination once in one year. Repeating the divination will have no effect. Maybe you have realized that the first stack will always be cleared, so the player will always be satisfied because he/she will be at least lucky in the coming month.\u003cbr\u003e\u003cbr\u003eSquark has distributed his cards and opened a few of them according to the rule. Suddenly, an urgent phone call comes and interrupts his game. It is from Sevenkplus asking him about some difficult algebraic geometry problems. These problems are so difficult that Squark spends a lot of time but solves none of them. When Squark comes back to his cards, they has been gathered and put into one stack. Squark cannot restore the game to the situation when he left. Furthermore, Squark cannot play the game again as the clock has passed 12 o’clock and it is January 1 now. Fortunately, Squark can still remember the cards he opened and the exact open sequence. So he wants to know the probability of each possible result if he could have continued the game.\u003cbr\u003e\u003cbr\u003eAs January is always a lucky month, there are 2\u003csup\u003e11\u003c/sup\u003e possible results regarding the luckiness in the other months. We define a comparison method for these results to sort them, which compares the luckiness in December first, and then in November, and so on. To be unlucky is considered to be smaller than to be lucky.\u003cbr\u003e\u003cbr\u003eTo simplify the work to test your program, Squark considers the number of months in each year to be n instead of 12. In this way, the number of possible results is 2\u003csup\u003en - 1\u003c/sup\u003e instead of 2\u003csup\u003e11\u003c/sup\u003e.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line contains an integer T (T ≤ 40) denoting the number of the test cases.\u003cbr\u003e\u003cbr\u003eFor each test case, the first line contains 2 integers n(2 ≤ n ≤ 12) and m(0 ≤ m ≤ 4n), where n is the number of months in each year and m is the number of cards Squark opened. The second line contains m integers, standing for the cards opened by Squark (1 for Ace, 11 for Jack and 12 for Queen) in the order how Squark opened them. Note that the second line is a blank line if m \u003d 0."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output 2\u003csup\u003en - 1\u003c/sup\u003e lines, each containing a real number representing the probability of each possible result in the order as described above. Your answer is considered to be correct if and only if it satisfies at least one of the two conditions below.\u003cbr\u003e\u003cbr\u003e 1.The absolute error is at most 10\u003csup\u003e-12\u003c/sup\u003e;\u003cbr\u003e\u003cbr\u003e 2.The relative error is at most 10\u003csup\u003e-9\u003c/sup\u003e.\u003cbr\u003e"}},{"title":"Sample","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\u003e2\r\n2 4\r\n2 2 2 2\r\n2 0\t\t\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0.0000000000000\r\n1.0000000000000\r\n0.5000000000000\r\n0.5000000000000\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}