{"problem":{"name":"Range Xor Query","description":{"content":"We have an integer sequence $A$ of length $N$.   You will process $Q$ queries on this sequence. In the $i$\\-th query, given values $T_i$, $X_i$, and $Y_i$, do the following: *   If $T_i = 1$, replace","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc185_f"},"statements":[{"statement_type":"Markdown","content":"We have an integer sequence $A$ of length $N$.  \nYou will process $Q$ queries on this sequence. In the $i$\\-th query, given values $T_i$, $X_i$, and $Y_i$, do the following:\n\n*   If $T_i = 1$, replace $A_{X_i}$ with $A_{X_i} \\oplus Y_i$.\n*   If $T_i = 2$, print $A_{X_i} \\oplus A_{X_i + 1} \\oplus A_{X_i + 2} \\oplus \\dots \\oplus A_{Y_i}$.\n\nHere, $a \\oplus b$ denotes the bitwise XOR of $a$ and $b$.\nWhat is bitwise XOR?The bitwise XOR of integers $A$ and $B$, $A \\oplus B$, is defined as follows:\n\n*   When $A \\oplus B$ is written in base two, the digit in the $2^k$'s place ($k \\geq 0$) is $1$ if either $A$ or $B$, but not both, has $1$ in the $2^k$'s place, and $0$ otherwise.\n\nFor example, $3 \\oplus 5 = 6$. (In base two: $011 \\oplus 101 = 110$.)\n\n## Constraints\n\n*   $1 \\le N \\le 300000$\n*   $1 \\le Q \\le 300000$\n*   $0 \\le A_i \\lt 2^{30}$\n*   $T_i$ is $1$ or $2$.\n*   If $T_i = 1$, then $1 \\le X_i \\le N$ and $0 \\le Y_i \\lt 2^{30}$.\n*   If $T_i = 2$, then $1 \\le X_i \\le Y_i \\le N$.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $Q$\n$A_1 \\hspace{7pt} A_2 \\hspace{7pt} A_3 \\hspace{5pt} \\dots \\hspace{5pt} A_N$\n$T_1$ $X_1$ $Y_1$\n$T_2$ $X_2$ $Y_2$\n$T_3$ $X_3$ $Y_3$\n$\\hspace{22pt} \\vdots$\n$T_Q$ $X_Q$ $Y_Q$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc185_f","tags":[],"sample_group":[["3 4\n1 2 3\n2 1 3\n2 2 3\n1 2 3\n2 2 3","0\n1\n2\n\nIn the first query, we print $1 \\oplus 2 \\oplus 3 = 0$.  \nIn the second query, we print $2 \\oplus 3 = 1$.  \nIn the third query, we replace $A_2$ with $2 \\oplus 3 = 1$.  \nIn the fourth query, we print $1 \\oplus 3 = 2$."],["10 10\n0 5 3 4 7 0 0 0 1 0\n1 10 7\n2 8 9\n2 3 6\n2 1 6\n2 1 10\n1 9 4\n1 6 1\n1 6 3\n1 1 7\n2 3 5","1\n0\n5\n3\n0"]],"created_at":"2026-03-03 11:01:14"}}