3 2 4 6
4
If Takahashi erases $2,6,4$ from his notepad for the first to third actions, respectively, and moves as $(0,0)\rightarrow (0,2) \rightarrow (-4,0) \rightarrow (0,0)$, then $\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)$ is $4$, which is the minimum.5 2 2 2 2 6
3
If Takahashi erases $2,2,6,2,2$ from his notepad for the first to fifth actions, respectively, and moves as $(0,0)\rightarrow (\frac{1}{2},\frac{3}{2})\rightarrow (0,3) \rightarrow (0,-3) \rightarrow (-\frac{1}{2},-\frac{3}{2}) \rightarrow (0,0)$, then $\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)$ is $3$, which is the minimum.
Takahashi can also move to non-grid points.2 2 200000
\-1 Takahashi cannot return to the origin after performing $N$ actions as described above.
{
"problem": {
"name": "Walk Around Neighborhood",
"description": {
"content": "Takahashi, with a notepad, is standing at the origin $(0,0)$ of a two-dimensional plane. His notepad has $N$ **even numbers** $D_i\\ (1\\leq i \\leq N)$ written. Takahashi will perform the following acti",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 4000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "agc062_d"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Takahashi, with a notepad, is standing at the origin $(0,0)$ of a two-dimensional plane. His notepad has $N$ **even numbers** $D_i\\ (1\\leq i \\leq N)$ written.\nTakahashi will perform the following acti...",
"is_translate": false,
"language": "English"
}
]
}