{"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\u003eOne day, Mio visits an Animation Comic Game Novel (ACGN) Exhibition, and she would like to buy some presents for Ritsu. \u003c/p\u003e\u003cp\u003eWe assure that the space of the exhibition is a $$$n \\times m$$$ grid, called the grid $$$A$$$, and each cell in the grid represents a stall, only selling present $$$0$$$ or $$$1$$$. In other words, every cell of the $$$n \\times m$$$ grid $$$A$$$ is filled with $$$0$$$ or $$$1$$$.\u003c/p\u003e\u003cp\u003eUnder the control policy for containing COVID-19, there are some restrictions on visiting route.\u003c/p\u003e\u003cp\u003eWe define a SAFE PATH as a path from the top left cell $$$(1,1)$$$, to the bottom right cell $$$(n,m)$$$, and if you are in the cell $$$(x,y)$$$, then you can only travel to the cells $$$(x+1,y)$$$ or $$$(x,y+1)$$$. Every visitor has to visit the exhibition through SAFE PATH, so does Mio.\u003c/p\u003e\u003cp\u003eThe two paths are considered to be different if and only if at least one cell passed differs.\u003c/p\u003e\u003cp\u003eMio wonders how many different SAFE PATHs, which have some $$$0$$$s and $$$1$$$s, and the number of $$$0$$$ is at least $$$p$$$, the number of $$$1$$$ is at least $$$q$$$.\u003c/p\u003e\u003cp\u003eSince the answer may be too large, you only need to output the result modulo $$$998244353$$$.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains four integers, $$$n$$$, $$$m$$$, $$$p$$$, $$$q$$$ ($$$1\\le n,m\\le 500,0\\le p,q \\le10000$$$).\u003c/p\u003e\u003cp\u003eEach of the next $$$n$$$ lines contains $$$m$$$ space separated integers $$$A_{i,j}$$$ $$$(0\\le A_{i,j}\\le 1)$$$, denoting the number in the cell $$$(i,j)$$$ of the grid $$$A$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint a single integer, denoting the answer to the question, modulo $$$998244353$$$.\u003c/p\u003e"}},{"title":"Examples","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\u003e2 2 1 1\n0 0\n1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e3 3 2 0\n0 0 1\n0 0 1\n1 0 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}