{"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\u003e\n \u0026nbsp; \n \u003cspan\u003e\u003cspan\u003e\u003cspan\u003e麦克斯韦有一些数,\u003c/span\u003e它是这样的:\u003c/span\u003e\u003cspan\u003e\u003cspan\u003ea\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u0026nbsp;\n \u003csub\u003e0,0\u003c/sub\u003e\u0026nbsp;\u003d 0,\n \u003cspan\u003ea\u003c/span\u003e \n \u003csub\u003e0,1\u003c/sub\u003e \u003d 233,a \n \u003csub\u003e0,2\u003c/sub\u003e \u003d 2333,a \n \u003csub\u003e0,3\u003c/sub\u003e \u003d 23333...\n \u003cspan\u003e除此之外,麦克斯韦还给了一个递推式\u003c/span\u003e a \n \u003csub\u003ei,j\u003c/sub\u003e \u003d a \n \u003csub\u003ei-1,j\u003c/sub\u003e +a \n \u003csub\u003ei,j-1\u003c/sub\u003e( i,j ≠ 0).现在给你 a \n \u003csub\u003e1,0\u003c/sub\u003e,a \n \u003csub\u003e2,0\u003c/sub\u003e,...,a \n \u003csub\u003en,0\u003c/sub\u003e, \n \u003cspan\u003e你能告诉麦克斯韦,a\u003c/span\u003e \n \u003csub\u003en,m\u003c/sub\u003e \n \u003cspan\u003e是多少吗?\u003c/span\u003e\n\u003c/div\u003e"}},{"title":"输入格式","value":{"format":"HTML","content":"\u003cp\u003e \u003cspan\u003e\u003cspan\u003e\u003cspan\u003e多组数据。\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr\u003e \u003cbr\u003e \u003cspan\u003e\u003cspan\u003e\u003cspan\u003e每一组数据第一行有两个正整数\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e n,m(n ≤ 10,m ≤ 10 \u003csup\u003e9\u003c/sup\u003e). \u003cspan\u003e\u003cspan\u003e\u003cspan\u003e第二行是n个整数\u003c/span\u003ea\u003c/span\u003e\u003c/span\u003e \u003csub\u003e1,0\u003c/sub\u003e,a \u003csub\u003e2,0\u003c/sub\u003e,...,a \u003csub\u003en,0\u003c/sub\u003e(0 ≤ a \u003csub\u003ei,0\u003c/sub\u003e \u0026lt; 2 \u003csup\u003e31\u003c/sup\u003e).\u003c/p\u003e"}},{"title":"输出格式","value":{"format":"HTML","content":"\u003cp\u003e \u003cspan\u003e\u003cspan\u003e\u003cspan\u003e输出\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e a \u003csub\u003en,m\u003c/sub\u003e mod 10000007.\u003c/p\u003e"}},{"title":"样例","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e1 1\n1\n2 2\n0 0\n3 7\n23 47 16\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e234\n2799\n72937\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}