{"trustable":false,"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\u003e四川火锅是享誉全球的中国特色美食。人们对它的麻辣口味欲罢不能。\u003c/p\u003e\n\u003cp\u003e话说有 $$$n$$$ 名食客,从 $$$0$$$ 至 $$$(n-1)$$$ 编号,就围坐在一个火锅旁。火锅旁备着 $$$k$$$ 种菜,第 $$$i$$$ 位食客最喜欢吃第 $$$a_i$$$ 种菜。最初,所有食客的开心值都是 $$$0$$$ ,火锅里什么菜也没有。\u003c/p\u003e\n\u003cp\u003e食客们将按顺序行动 $$$m$$$ 次, 第 $$$i$$$ 次行动 (行动编号从 $$$0$$$ 至 $$$(m - 1)$$$)由第 $$$(i \\mod n)$$$ 名食客进行。记当前是食客 $$$t$$$ 在行动:\u003c/p\u003e\n\u003cul\u003e\n \u003cli\u003e如果火锅里有一份他喜欢的 $$$a_t$$$ 菜,他会把那份菜捞起来吃掉,获得 $$$1$$$ 点快乐值;\u003c/li\u003e\n \u003cli\u003e否则,他会放一份他喜欢的 $$$a_t$$$ 菜进火锅。这样的行动不会产生快乐值。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e请计算在 $$$m$$$ 次行动后,每名食客的快乐值。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e多组测试数据。输入第一行包括一个整数 $$$T$$$ ($$$1 \\le T \\le 10^3$$$) 表示测试数据的数目。对于每组测试数据:\u003c/p\u003e\n\u003cp\u003e第一行输入三个整数 $$$n$$$ ,$$$k$$$ 和 $$$m$$$ ($$$1 \\le n \\le 10^5$$$, $$$1 \\le k \\le 10^5$$$, $$$1 \\le m \\le 10^9$$$) 分别表示食客,菜品的数量和行动次数;\u003c/p\u003e\n\u003cp\u003e第二行输入 $$$n$$$ 个整数 $$$a_0, a_1, \\cdots, a_{n-1}$$$ ($$$1 \\le a_i \\le k$$$) 表示每名食客最喜欢的菜。\u003c/p\u003e\n\u003cp\u003e保证 $$$n$$$ 的总和与 $$$k$$$ 的总和均不超过 $$$2 \\times 10^5$$$。\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e对于每组测试数据,输出一行 $$$n$$$ 个整数 $$$h_0, h_1, \\cdots, h_{n-1}$$$ 表示每名食客得到的快乐值。\u003c/p\u003e\n\u003cp\u003e请不要在行末输出额外的空格,否则你的代码可能会被判定为答案错误!\u003c/p\u003e"}},{"title":"Sample 1","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\u003e4\n3 2 6\n1 1 2\n1 1 5\n1\n2 2 10\n1 2\n2 2 10\n1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0 2 1\n2\n2 2\n0 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eThe first sample test case is explained as follows:\u003c/p\u003e\n\u003ccenter\u003e\n \u003ctable class\u003d\"tex-tabular\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eMove\u003c/span\u003e\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eTourist\u003c/span\u003e\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eAction\u003c/span\u003e\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003ePot after move\u003c/span\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e0\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e0\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003ePuts ingredient 1 into the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{1\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e1\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e1\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003eEats ingredient 1 in the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e2\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e2\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003ePuts ingredient 2 into the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{2\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e3\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e0\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003ePuts ingredient 1 into the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{1, 2\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e4\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e1\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003eEats ingredient 1 in the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{2\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e5\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e2\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003eEats ingredient 2 in the pot\u003c/td\u003e\n \u003ctd class\u003d\"tex-tabular-border-left tex-tabular-text-align-center tex-tabular-border-right tex-tabular-border-top tex-tabular-border-bottom\"\u003e$$$\\{\\}$$$\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n\u003c/center\u003e"}}]}