{"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":"MD","content":"\u003cp\u003eTXT 一觉醒来发现自己身处一个由n*m个格子组成的的迷宫中。\u003c/pre\u003e\n\u003cp\u003e一开始 TXT 处在(r,c)的位置,每次移动 TXT 可以朝四个方向前进一个单位,但是某些格子是障碍,无法被通过。\u003c/p\u003e\n\u003cp\u003eTXT 迫切地想知道她现在能到达的格子有多少个。\u003c/p\u003e\n\u003cp\u003e不幸的是,TXT 实在是太宅了,体力告罄,因此她向左移动的次数不能超过x次,向右移动的次数不能超过y次。\u003c/p\u003e"}},{"title":"Input","value":{"format":"MD","content":"输入的第一行包含两个整数 $n$、$m$ ($1 \\le n, m \\le 2000$) —— 分别是迷宫的行数和列数。\n\n第二行包含两个整数 $r$、$c$ ($1 \\le r \\le n$、$1 \\le c \\le m$) —— 定义起始单元格的行索引和列索引。\n\n第三行包含两个整数 $x$、$y$ ($0 \\le x, y \\le 10^{9}$) —— 分别是向左和向右移动的最大允许次数。\n\n接下来的 $n$ 行描述了迷宫。每一行的长度为 $m$,只包含符号 \u0027.\u0027 和 \u0027*\u0027。第 $i$ 行的第 $j$ 个字符对应于迷宫中第 $i$ 行和第 $j$ 列的单元格。符号 \u0027.\u0027 表示空闲单元格,而符号 \u0027*\u0027 表示有障碍物的单元格。\n\n保证起始单元格不包含障碍物。"}},{"title":"Output","value":{"format":"MD","content":"输出在向左移动的次数不超过x次,向右移动的次数不超过y次的情况下,TXT 能到达的格子个数。"}},{"title":"Sample In 1","value":{"format":"MD","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":"MD","content":"\u003cpre\u003e10\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Sample In 2","value":{"format":"MD","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":"MD","content":"\u003cpre\u003e7\u003cbr\u003e\u003c/pre\u003e"}},{"title":"Note","value":{"format":"MD","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"}}]}