3 3 1 2 3 2 3 1 2 0 2 3
15 9 When the $1$\-st query is given, $A=(1,2,3)$, so $B=(1,3,6)$, $C=(1,4,10)$, and $D=(1,5,15)$; thus, $D_3=15$. When the $3$\-rd query is given, $A=(1,0,3)$, so $B=(1,1,4)$, $C=(1,2,6)$, and $D=(1,3,9)$; thus, $D_3=9$.
2 1 998244353 998244353 2 1
0
{
"problem": {
"name": "Cumulative Cumulative Cumulative Sum",
"description": {
"content": "You are given $N$, $Q$, and $A=(A_1,\\ldots,A_N)$. Process $Q$ queries, each of which is of one of the following two kinds: * `1 x v`: update $A_x$ to $v$. * `2 x`: let $B_i=\\sum_{j=1}^{i}A_j$, ",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc256_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given $N$, $Q$, and $A=(A_1,\\ldots,A_N)$. \nProcess $Q$ queries, each of which is of one of the following two kinds:\n\n* `1 x v`: update $A_x$ to $v$.\n* `2 x`: let $B_i=\\sum_{j=1}^{i}A_j$, ...",
"is_translate": false,
"language": "English"
}
]
}