{"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":"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\r\n1 1\r\n1\r\n2 2\r\n0 0\r\n3 7\r\n23 47 16\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\n234\r\n2799\r\n72937\r\n\r\n\r\n \r\n \u003ci\u003e \u003c/i\u003e\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cpre\u003e\r\n\u003c/pre\u003e \n\u003cdiv\u003e \n \u003cpre\u003e\r\n\t\u003c/pre\u003e \n \u003cdiv\u003e \n \u003cpre\u003e\r\n\t\t\u003c/pre\u003e \n \u003c/div\u003e \n \u003cimg src\u003d\"http://7xjob4.com1.z0.glb.clouddn.com/e16fdbdbfc2b7ec1eb880583fd64a1c5\"\u003e\n\u003c/div\u003e"}}]}