{"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\u003ewbx定义了一种新的矩阵,\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你能告诉wbx,a\u003c/span\u003e \n \u003csub\u003en,m\u003c/sub\u003e \n \u003cspan\u003e是多少吗?\u003c/span\u003e\n\u003c/div\u003e"}},{"title":"Input","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":"Output","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":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\n1 1\n1\n2 2\n0 0\n3 7\n23 47 16\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\n234\n2799\n72937\n\u003ci\u003e \u003c/i\u003e\u003c/pre\u003e"}}]}