{"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\"\u003e\u0026nbsp;\u0026nbsp;Xavier, a 9-year-old student, loves playing many kinds of puzzles. One of his favourites is the following:\u003cbr\u003e\u0026nbsp;\u0026nbsp;Xerier, his classmate, has made many cards. She writes down a single positive number on each of them. No numbers written on different cards are the same. After that she writes down an equation, whose right side is a single positive number chosen by her, and the left side is the sum of p integers:\u003cbr\u003e\u003cbr\u003e\u0026nbsp;\u0026nbsp;Then she asks Xavier put p cards on the corresponding Xi’s position to make this equation correct, with an additional condition that Xi should be ordered from smaller to bigger, i.e.\u003cbr\u003e\u0026nbsp;\u0026nbsp;Every time Xavier immediately comes up with many solutions. Now he wants to know how many solutions in total are there for any n given by Xerier.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u0026nbsp;\u0026nbsp;There are multiple test cases. The number of them is given in the beginning of the input. Then a series of input block comes one by one.\u003cbr\u003e\u0026nbsp;\u0026nbsp;For each test case:\u003cbr\u003e\u0026nbsp;\u0026nbsp;The first line contains two space-separated integers m and p (1\u0026lt;\u003dp\u0026lt;\u003d5). The second line contains m distinct positive integers - the numbers written on each of the cards. None of these integers exceeds 13000.\u003cbr\u003e\u0026nbsp;\u0026nbsp;There are about 120 test cases in total, but 90% of them are relatively small. More precisely, all numbers are less than or equal to 100 in 90% of the test cases.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u0026nbsp;\u0026nbsp;For each test case:\u003cbr\u003e\u0026nbsp;\u0026nbsp;For each positive integer, output the number of ways in a single line. To keep the output finite, only numbers with positive ways should be outputted.\u003cbr\u003e\u0026nbsp;\u0026nbsp;Output a blank line after each test case. See sample for more format details.\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\u003e3\r\n3 3\r\n1 2 3\r\n5 4\r\n1 3 5 6 7\r\n10 3\r\n1 2 3 4 5 6 7 8 9 10\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1:\r\n6: 1\r\n\r\nCase #2:\r\n15: 1\r\n16: 1\r\n17: 1\r\n19: 1\r\n21: 1\r\n\r\nCase #3:\r\n6: 1\r\n7: 1\r\n8: 2\r\n9: 3\r\n10: 4\r\n11: 5\r\n12: 7\r\n13: 8\r\n14: 9\r\n15: 10\r\n16: 10\r\n17: 10\r\n18: 10\r\n19: 9\r\n20: 8\r\n21: 7\r\n22: 5\r\n23: 4\r\n24: 3\r\n25: 2\r\n26: 1\r\n27: 1\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}