3 2 3 2
1 1 1 2 2 1 2 2 3 1 3 2 The king goes $(1, 1) \to (1, 2) \to (2, 1) \to (2, 2)\to (3, 1) \to (3, 2)$, which is indeed a tour ending on $(3, 2)$. There are some other valid tours, three of which are listed below. * $(1, 1) \to (1, 2) \to (2, 2) \to (2, 1) \to (3, 1) \to (3, 2)$ * $(1, 1) \to (2, 1) \to (1, 2) \to (2, 2) \to (3, 1) \to (3, 2)$ * $(1, 1) \to (2, 2) \to (1, 2) \to (2, 1) \to (3, 1) \to (3, 2)$
{
"problem": {
"name": "King's Tour",
"description": {
"content": "We have an $H \\times W$ chessboard with $H$ rows and $W$ columns, and a king. Let $(i, j)$ denote the square at the $i$\\-th row from the top $(1 \\leq i \\leq H)$ and $j$\\-th column from the left $(1 ",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc232_h"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have an $H \\times W$ chessboard with $H$ rows and $W$ columns, and a king. \nLet $(i, j)$ denote the square at the $i$\\-th row from the top $(1 \\leq i \\leq H)$ and $j$\\-th column from the left $(1 ...",
"is_translate": false,
"language": "English"
}
]
}