{"trustable":false,"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\u003e张老师一觉醒来发现自己身处一个由n*m个格子组成的的迷宫中。\u003c/pre\u003e\n\u003cp\u003e一开始张老师处在(r,c)的位置,每次移动张老师可以朝四个方向前进一个单位,但是某些格子是障碍,无法被通过。\u003c/p\u003e\n\u003cp\u003e张老师想知道他现在能到达的格子有多少个。\u003c/p\u003e\n\u003cp\u003e不过这样的话这题就太简单了,于是张老师给你加了个附加条件:在向左移动的次数不能超过x次,向右移动的次数不能超过y次的。\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cpre\u003e\n第一行两个整数n,m。(1 ≤ n, m ≤ 2000)\n第二行两个整数r,c。(1 ≤ r ≤ n, 1 ≤ c ≤ m)\n第三行两个整数x,y。(0 ≤ x, y ≤ 10^9)\n接下来的n行每行一个长度为m的字符串描述每个格子的状态,为.代表这是个正常的格子,为*则代表这个格子是障碍。\n\u003c/pre\u003e"}},{"title":"Output","value":{"format":"HTML","content":"输出在向左移动的次数不超过x次,向右移动的次数不超过y次的情况下,张老师能到达的格子个数。"}},{"title":"Sample In 1","value":{"format":"HTML","content":"\u003cpre\u003e4 5\u003cbr\u003e3 2\u003cbr\u003e1 2\u003cbr\u003e.....\u003cbr\u003e.***.\u003cbr\u003e...**\u003cbr\u003e*....\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Sample Out 1","value":{"format":"HTML","content":"\u003cpre\u003e10\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Sample In 2","value":{"format":"HTML","content":"\u003cpre\u003e4 4\u003cbr\u003e2 2\u003cbr\u003e0 1\u003cbr\u003e....\u003cbr\u003e..*.\u003cbr\u003e....\u003cbr\u003e....\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Sample Out 2","value":{"format":"HTML","content":"\u003cpre\u003e7\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e能到达的格子用+标记。\u003c/p\u003e\n\u003cp\u003eSample 1: \u003c/p\u003e\n\u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003e+++..\u003cbr\u003e+***.\u003cbr\u003e+++**\u003cbr\u003e*+++.\u003cbr\u003e\u003c/pre\u003e \n\u003c/center\u003e\n\u003cp\u003eSample 2:\u003c/p\u003e\n\u003ccenter\u003e \n \u003cpre\u003e\u003cbr\u003e.++.\u003cbr\u003e.+*.\u003cbr\u003e.++.\u003cbr\u003e.++.\u003cbr\u003e\u003c/pre\u003e \n\u003c/center\u003e"}}]}