{"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\u003e四川火锅是世界上最著名的菜肴之一。人们喜欢它的辛辣口味。\u003c/p\u003e\u003cp\u003e有$$$n$$$名游客,从$$$0$$$到$$$(n-1)$$$编号,围坐在火锅周围。火锅总共有$$$k$$$种食材,第$$$i$$$位游客最喜欢第$$$a_i$$$种食材。最初,每位游客的幸福值为$$$0$$$,火锅是空的。\u003c/p\u003e\u003cp\u003e游客们将依次进行$$$m$$$次移动,其中第$$$i$$$次(从$$$0$$$到$$$(m - 1)$$$编号)移动由第$$$(i \\mod n)$$$位游客执行。当第$$$t$$$位游客移动时:\u003c/p\u003e\u003cul\u003e \u003cli\u003e 如果火锅中存在第$$$a_t$$$种食材,他会把它们全部吃掉,并获得$$$1$$$的幸福值。 \u003c/li\u003e\u003cli\u003e 否则,他会往火锅里放入一份第$$$a_t$$$种食材。他的幸福值保持不变。 \u003c/li\u003e\u003c/ul\u003e\u003cp\u003e你的任务是计算每位游客在进行$$$m$$$次移动后的幸福值。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e有多个测试用例。输入的第一行包含一个整数$$$T$$$($$$1 \\le T \\le 10^3$$$),表示测试用例的数量。对于每个测试用例:\u003c/p\u003e\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\u003cp\u003e第二行包含$$$n$$$个整数$$$a_0, a_1, \\cdots, a_{n-1}$$$($$$1 \\le a_i \\le k$$$),其中$$$a_i$$$表示第$$$i$$$位游客最喜欢的食材。\u003c/p\u003e\u003cp\u003e保证所有测试用例的$$$n$$$总和和$$$k$$$总和都不会超过$$$2 \\times 10^5$$$。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于每个测试用例,在一行中输出$$$n$$$个整数$$$h_0, h_1, \\cdots, h_{n-1}$$$,用空格分隔,其中$$$h_i$$$表示第$$$i$$$位游客在进行$$$m$$$次移动后的幸福值。\u003c/p\u003e\u003cp\u003e请不要在每行末尾输出额外的空格,否则你的答案可能会被视为错误!\u003c/p\u003e"}},{"title":"示例 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"}},{"title":"注意","value":{"format":"HTML","content":"\u003cp\u003e第一个示例测试用例的解释如下:\u003c/p\u003e\u003ccenter\u003e \u003ctable class\u003d\"tex-tabular\"\u003e\u003ctbody\u003e\u003ctr\u003e\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\"\u003e移动\u003c/span\u003e\u003c/td\u003e\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\"\u003e游客\u003c/span\u003e\u003c/td\u003e\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\"\u003e动作\u003c/span\u003e\u003c/td\u003e\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\"\u003e移动后的火锅\u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003ctr\u003e\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\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\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\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\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e \u003c/center\u003e"}}]}