3 4 -1 -1 1 2 -2 1 2 1 2 0 0 2 1 3 -1 2 1 1 0 1 2 1 3 -1 2
3 3 2 Initially, the $1$st, $2$nd, $3$rd Christmas trees are located at coordinates $(-1,-1)$, $(1,2)$, $(-2,1)$, respectively. Each query is processed as follows: * The Manhattan distances from the $1$st and $2$nd Christmas trees to coordinates $(0,0)$ are $2$ and $3$, respectively. Thus, output $3$, which is the maximum value among $2,3$. * The Manhattan distances from the $1$st, $2$nd, $3$rd Christmas trees to coordinates $(-1,2)$ are $3$, $2$, $2$, respectively. Thus, output $3$, which is the maximum value among $3,2,2$. * Change the coordinates of the $1$st Christmas tree to $(0,1)$. The coordinates of the $1$st, $2$nd, $3$rd Christmas trees become $(0,1),(1,2),(-2,1)$, respectively. * The Manhattan distances from the $1$st, $2$nd, $3$rd Christmas trees to coordinates $(-1,2)$ are $2$, $2$, $2$, respectively. Thus, output $2$, which is the maximum value among $2,2,2$.
5 7 -9 5 -2 -9 10 -6 9 8 2 9 1 3 -9 -6 2 3 4 2 7 1 4 -2 -10 2 1 2 0 -10 2 3 4 10 -9 2 3 4 8 7 2 5 5 0 2
24 24 22 30 9
{
"problem": {
"name": "Manhattan Christmas Tree 2",
"description": {
"content": "There are $N$ Christmas trees on a two-dimensional plane. The $i$\\-th $(1\\le i\\le N)$ Christmas tree is located at coordinates $(X_i,Y_i)$. You are given $Q$ queries. Process the queries in order. Eac",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 3000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc437_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ Christmas trees on a two-dimensional plane. The $i$\\-th $(1\\le i\\le N)$ Christmas tree is located at coordinates $(X_i,Y_i)$.\nYou are given $Q$ queries. Process the queries in order. Eac...",
"is_translate": false,
"language": "English"
}
]
}