{"problem":{"name":"All Assign Point Add","description":{"content":"You are given a sequence $A = (A_1, A_2, \\dots, A_N)$ of length $N$. Given $Q$ queries, process all of them in order. The $q$\\-th $(1\\leq q\\leq Q)$ query is in one of the following three formats, whic","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc278_d"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence $A = (A_1, A_2, \\dots, A_N)$ of length $N$.\nGiven $Q$ queries, process all of them in order. The $q$\\-th $(1\\leq q\\leq Q)$ query is in one of the following three formats, which represents the following queries:\n\n*   $1\\ x _ q$: assign $x_q$ to every element of $A$.\n*   $2\\ i _ q\\ x _ q$: add $x_q$ to $A _ {i _ q}$.\n*   $3\\ i _ q$: print the value of $A _ {i _ q}$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2\\times10^5$\n*   $1 \\leq Q \\leq 2\\times10^5$\n*   $0 \\leq A _ i \\leq 10^9\\ (1\\leq i\\leq N)$\n*   If the $q$\\-th $(1\\leq q\\leq Q)$ query is in the second or third format, $1 \\leq i _ q \\leq N$.\n*   If the $q$\\-th $(1\\leq q\\leq Q)$ query is in the first or second format, $0 \\leq x _ q \\leq 10^9$.\n*   There exists a query in the third format.\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$\n$Q$\n$\\operatorname{query}_1$\n$\\operatorname{query}_2$\n$\\vdots$\n$\\operatorname{query}_Q$\n\nHere, $\\operatorname{query}_q$ denotes the $q$\\-th query, which is in one of following formats: `1 x`, `2 i x`, and `3 i`.\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc278_d","tags":[],"sample_group":[["5\n3 1 4 1 5\n6\n3 2\n2 3 4\n3 3\n1 1\n2 3 4\n3 3","1\n8\n5\n\nInitially, $A=(3,1,4,1,5)$. The queries are processed as follows:\n\n*   $A_2=1$, so print $1$.\n*   Add $4$ to $A_3$, making $A=(3,1,8,1,5)$.\n*   $A_3=8$, so print $8$.\n*   Assign $1$ to every element of $A$, making $A=(1,1,1,1,1)$.\n*   Add $4$ to $A_3$, making $A=(1,1,5,1,1)$.\n*   $A_3=5$, so print $5$."],["1\n1000000000\n8\n2 1 1000000000\n2 1 1000000000\n2 1 1000000000\n2 1 1000000000\n2 1 1000000000\n2 1 1000000000\n2 1 1000000000\n3 1","8000000000\n\nNote that the elements of $A$ may not fit into a $32$\\-bit integer type."],["10\n1 8 4 15 7 5 7 5 8 0\n20\n2 7 0\n3 7\n3 8\n1 7\n3 3\n2 4 4\n2 4 9\n2 10 5\n1 10\n2 4 2\n1 10\n2 3 1\n2 8 11\n2 3 14\n2 1 9\n3 8\n3 8\n3 1\n2 6 5\n3 7","7\n5\n7\n21\n21\n19\n10"]],"created_at":"2026-03-03 11:01:13"}}