2 2 1
6
The possible transitions of (the number of blocks on Square $1$, the number of blocks on Square $2$) are as follows:
* $(0, 0)$ -> $(0, 1)$ -> $(1, 1)$ -> $(1, 2)$ -> $(2, 2)$
* $(0, 0)$ -> $(0, 1)$ -> $(1, 1)$ -> $(2, 1)$ -> $(2, 2)$
* $(0, 0)$ -> $(0, 1)$ -> $(2, 1)$ -> $(2, 2)$
* $(0, 0)$ -> $(1, 0)$ -> $(1, 1)$ -> $(1, 2)$ -> $(2, 2)$
* $(0, 0)$ -> $(1, 0)$ -> $(1, 1)$ -> $(2, 1)$ -> $(2, 2)$
* $(0, 0)$ -> $(1, 0)$ -> $(1, 2)$ -> $(2, 2)$
Thus, there are six ways to have two blocks on every square.2 30 15
94182806
31415 9265 3589
312069529 Be sure to print the number modulo $10^9+7$.
{
"problem": {
"name": "Balanced Piles",
"description": {
"content": "There are $N$ squares arranged in a row, numbered $1$ to $N$ from left to right. Takahashi will stack building blocks on these squares, on which there are no blocks yet. He wants to stack blocks on th",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "diverta2019_2_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ squares arranged in a row, numbered $1$ to $N$ from left to right. Takahashi will stack building blocks on these squares, on which there are no blocks yet.\nHe wants to stack blocks on th...",
"is_translate": false,
"language": "English"
}
]
}