3 3 ... .#. ...
10 There are $10$ ways to travel, as follows: * $(1,1)\to (1,2)\to (1,3)\to (2,3)\to (3,3)$ * $(1,1)\to (1,2)\to (1,3)\to (3,3)$ * $(1,1)\to (1,2)\to (2,3)\to (3,3)$ * $(1,1)\to (1,3)\to (2,3)\to (3,3)$ * $(1,1)\to (1,3)\to (3,3)$ * $(1,1)\to (2,1)\to (3,1)\to (3,2)\to (3,3)$ * $(1,1)\to (2,1)\to (3,1)\to (3,3)$ * $(1,1)\to (2,1)\to (3,2)\to (3,3)$ * $(1,1)\to (3,1)\to (3,2)\to (3,3)$ * $(1,1)\to (3,1)\to (3,3)$
4 4 ...# .... ..#. ....
84 From $(1,1)$, the queen can move to $(1,2)$, $(1,3)$, $(2,1)$, $(2,2)$, $(3,1)$, or $(4,1)$. One possible path to $(4,4)$ is $(1,1)\to (3,1)\to (3,2)\to (4,3)\to (4,4)$.
8 10 .......... .......... .......... .......... .......... .......... .......... ..........
13701937 Find the count modulo $(10^9+7)$.
{
"problem": {
"name": "Queen on Grid",
"description": {
"content": "We have a grid with $H$ horizontal rows and $W$ vertical columns of squares. Square $(i,j)$, which is at the $i$\\-th row from the top and $j$\\-th column from the left, is _wall_ if $S_{ij}$ is `#` and",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc183_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have a grid with $H$ horizontal rows and $W$ vertical columns of squares. Square $(i,j)$, which is at the $i$\\-th row from the top and $j$\\-th column from the left, is _wall_ if $S_{ij}$ is `#` and...",
"is_translate": false,
"language": "English"
}
]
}