{"problem":{"name":"Ex - I like Query Problem","description":{"content":"You are given $N$, $Q$, and $A=(a_1,\\ldots,a_N)$.   Process $Q$ queries described below. Each query is of one of the following three kinds: *   `1 L R x`: for $i=L,L+1,\\dots,R$, update the value of $","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":8000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc256_h"},"statements":[{"statement_type":"Markdown","content":"You are given $N$, $Q$, and $A=(a_1,\\ldots,a_N)$.  \nProcess $Q$ queries described below. Each query is of one of the following three kinds:\n\n*   `1 L R x`: for $i=L,L+1,\\dots,R$, update the value of $a_i$ to $\\displaystyle \\left\\lfloor \\frac{a_i}{x} \\right\\rfloor$.\n*   `2 L R y`: for $i=L,L+1,\\dots,R$, update the value of $a_i$ to $y$.\n*   `3 L R`: print $\\displaystyle\\sum_{i=L}^R a_i$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 5 \\times 10^5$\n*   $1 \\leq Q \\leq 10^5$\n*   $1 \\leq L \\leq R \\leq N$\n*   $1 \\leq a_i \\leq 10^5$\n*   $2 \\leq x \\leq 10^5$\n*   $1 \\leq y \\leq 10^5$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format, where $\\text{query}_i$ denotes the $i$\\-th query to be processed:\n\n$N$ $Q$\n$a_1$ $a_2$ $\\dots$ $a_N$\n$\\text{query}_1$\n$\\text{query}_2$\n$\\vdots$\n$\\text{query}_Q$\n\nEach query is given in one of the following three formats:\n\n$1$ $L$ $R$ $x$\n\n$2$ $L$ $R$ $y$\n\n$3$ $L$ $R$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc256_h","tags":[],"sample_group":[["3 5\n2 5 6\n3 1 3\n1 2 3 2\n3 1 2\n2 1 2 3\n3 1 3","13\n4\n9\n\nInitially, $A = (2, 5, 6)$. Thus, the answer to the $1$\\-st query is $a_1 + a_2 + a_3 = 2 + 5 + 6 = 13$.  \nWhen the $2$\\-nd query has been processed, $A = (2, 2, 3)$. Thus, the answer to the $3$\\-rd query is $a_1 + a_2 = 2 + 2 = 4$.  \nWhen the $4$\\-th query has been processed, $A = (3, 3, 3)$. Thus, the answer to the $5$\\-th query is $a_1 + a_2 + a_3 = 3 + 3 + 3 = 9$."],["6 11\n10 3 5 20 6 7\n3 1 6\n1 2 4 3\n3 1 3\n2 1 4 10\n3 3 6\n1 3 6 2\n2 1 4 5\n3 1 6\n2 1 3 100\n1 2 5 6\n3 1 4","51\n12\n33\n26\n132"]],"created_at":"2026-03-03 11:01:14"}}