{"trustable":false,"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\n 作为红黑名的选手hc最近痴迷于多项式,以至于忘记了他的cf账号,现在不得以开小号从头开始打,但是发现连紫都上不去。于是很纳闷的去打多项式,他随手就a了一道ntt分治,然后准备去挑战教练给的难题。\u003cbr\u003e\n在侯手里有一个长度为 $n$ 的排列 $p$ ,并给出一个数字 $k$ ,在排列中选出 $k$ 个数字,将他们的下标放入 $T$ 集合,并将每一个下标对应的值放入另一个集合 $S$ ,作为教练他想选出真正的多项式大师,所以他认为只有选出的两个集合满足交集为空的人才能通过挑战。\u003cbr\u003e\nhc觉得太 $easy$ 了,于是他想知道有多少种方案可以通过教练的考验\u003cbr\u003e\n\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"多组样例测试 第一行给出 $T$ 表示样例组数\u003cbr\u003e\n每组样例第一行给出 $n,k$ 分别表示排列长度和选择数字个数\u003cbr\u003e\n第二行给出长度为 $n$ 的排列( $n$ 个不同的数字,且小于等于 $n$ )\u003cbr\u003e\n$n$ 小于等于$5e5,0\u003c\u003dk\u003c\u003dn$;\u003cbr\u003e\n题目保证 $n$ 的总和$\u003c\u003d6e5$\n"}},{"title":"Output","value":{"format":"HTML","content":"For each test case:\u003cbr\u003e\u003cbr\u003ePrint one integer in a line, denoting the answer number modulo $998\\ 244\\ 353$."}},{"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\u003e\u003cpre\u003e3\n5 1\n5 3 2 1 4\n5 2\n2 5 1 3 4\n10 3\n10 9 3 8 6 4 5 7 2 1\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e5\n5\n40\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}