4 4 2 4 1 1 2 3 2 4
1 3 6 -1 Let $(i,j)$ denote the square at the $i$\-th row from the top and $j$\-th column from the left. For $k=1$, we need one move such as $(1,1)$ → $(2,1)$. For $k=2$, we need three moves such as $(1,1)$ → $(2,1)$ → $(2,2)$ → $(3,2)$. For $k=3$, we need six moves such as $(1,1)$ → $(2,1)$ → $(2,2)$ → $(3,2)$ → $(3,3)$ → $(3,4)$ → $(4,4)$. For $k=4$, it is impossible to reach any square in the fifth row from the top.
{
"problem": {
"name": "I hate Shortest Path Problem",
"description": {
"content": "There is a grid of squares with $H+1$ horizontal rows and $W$ vertical columns. You will start at one of the squares in the top row and repeat moving one square right or down. However, for each intege",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc177_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a grid of squares with $H+1$ horizontal rows and $W$ vertical columns.\nYou will start at one of the squares in the top row and repeat moving one square right or down. However, for each intege...",
"is_translate": false,
"language": "English"
}
]
}