{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eWe have an integer sequence \u003cvar\u003e\\(A\\)\u003c/var\u003e of length \u003cvar\u003e\\(N\\)\u003c/var\u003e.\u003cbr\u003e\r\nYou will process \u003cvar\u003e\\(Q\\)\u003c/var\u003e queries on this sequence. In the \u003cvar\u003e\\(i\\)\u003c/var\u003e-th query, given values \u003cvar\u003e\\(T_i\\)\u003c/var\u003e, \u003cvar\u003e\\(X_i\\)\u003c/var\u003e, and \u003cvar\u003e\\(Y_i\\)\u003c/var\u003e, do the following:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eIf \u003cvar\u003e\\(T_i \u003d 1\\)\u003c/var\u003e, replace \u003cvar\u003e\\(A_{X_i}\\)\u003c/var\u003e with \u003cvar\u003e\\(A_{X_i} \\oplus Y_i\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003cli\u003eIf \u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e, print \u003cvar\u003e\\(A_{X_i} \\oplus A_{X_i + 1} \\oplus A_{X_i + 2} \\oplus \\dots \\oplus A_{Y_i}\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eHere, \u003cvar\u003e\\(a \\oplus b\\)\u003c/var\u003e denotes the bitwise XOR of \u003cvar\u003e\\(a\\)\u003c/var\u003e and \u003cvar\u003e\\(b\\)\u003c/var\u003e.\r\n\u003c/p\u003e\u003cdetails\u003e\r\n\u003csummary\u003eWhat is bitwise XOR?\u003c/summary\u003e\r\n\u003cp\u003e\r\nThe bitwise XOR of integers \u003cvar\u003e\\(A\\)\u003c/var\u003e and \u003cvar\u003e\\(B\\)\u003c/var\u003e, \u003cvar\u003e\\(A \\oplus B\\)\u003c/var\u003e, is defined as follows:\r\n\u003c/p\u003e\u003cul\u003e\r\n\u003cli\u003eWhen \u003cvar\u003e\\(A \\oplus B\\)\u003c/var\u003e is written in base two, the digit in the \u003cvar\u003e\\(2^k\\)\u003c/var\u003e\u0027s place (\u003cvar\u003e\\(k \\geq 0\\)\u003c/var\u003e) is \u003cvar\u003e\\(1\\)\u003c/var\u003e if either \u003cvar\u003e\\(A\\)\u003c/var\u003e or \u003cvar\u003e\\(B\\)\u003c/var\u003e, but not both, has \u003cvar\u003e\\(1\\)\u003c/var\u003e in the \u003cvar\u003e\\(2^k\\)\u003c/var\u003e\u0027s place, and \u003cvar\u003e\\(0\\)\u003c/var\u003e otherwise.\u003c/li\u003e\r\n\u003c/ul\u003e\r\nFor example, \u003cvar\u003e\\(3 \\oplus 5 \u003d 6\\)\u003c/var\u003e. (In base two: \u003cvar\u003e\\(011 \\oplus 101 \u003d 110\\)\u003c/var\u003e.)\r\n\u003cp\u003e\u003c/p\u003e\r\n\u003c/details\u003e\u003cp\u003e\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\le N \\le 300000\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(1 \\le Q \\le 300000\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(0 \\le A_i \\lt 2^{30}\\)\u003c/var\u003e\u003c/li\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(T_i\\)\u003c/var\u003e is \u003cvar\u003e\\(1\\)\u003c/var\u003e or \u003cvar\u003e\\(2\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003cli\u003eIf \u003cvar\u003e\\(T_i \u003d 1\\)\u003c/var\u003e, then \u003cvar\u003e\\(1 \\le X_i \\le N\\)\u003c/var\u003e and \u003cvar\u003e\\(0 \\le Y_i \\lt 2^{30}\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003cli\u003eIf \u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e, then \u003cvar\u003e\\(1 \\le X_i \\le Y_i \\le N\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003cli\u003eAll values in input are integers.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e \u003cvar\u003e\\(Q\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(A_1 \\hspace{7pt} A_2 \\hspace{7pt} A_3 \\hspace{5pt} \\dots \\hspace{5pt} A_N\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_1\\)\u003c/var\u003e \u003cvar\u003e\\(X_1\\)\u003c/var\u003e \u003cvar\u003e\\(Y_1\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_2\\)\u003c/var\u003e \u003cvar\u003e\\(X_2\\)\u003c/var\u003e \u003cvar\u003e\\(Y_2\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_3\\)\u003c/var\u003e \u003cvar\u003e\\(X_3\\)\u003c/var\u003e \u003cvar\u003e\\(Y_3\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(\\hspace{22pt} \\vdots\\)\u003c/var\u003e\r\n\u003cvar\u003e\\(T_Q\\)\u003c/var\u003e \u003cvar\u003e\\(X_Q\\)\u003c/var\u003e \u003cvar\u003e\\(Y_Q\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eFor each query with \u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e in the order received, print the response in its own line.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 4\r\n1 2 3\r\n2 1 3\r\n2 2 3\r\n1 2 3\r\n2 2 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\r\n1\r\n2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eIn the first query, we print \u003cvar\u003e\\(1 \\oplus 2 \\oplus 3 \u003d 0\\)\u003c/var\u003e.\u003cbr\u003e\r\nIn the second query, we print \u003cvar\u003e\\(2 \\oplus 3 \u003d 1\\)\u003c/var\u003e.\u003cbr\u003e\r\nIn the third query, we replace \u003cvar\u003e\\(A_2\\)\u003c/var\u003e with \u003cvar\u003e\\(2 \\oplus 3 \u003d 1\\)\u003c/var\u003e.\u003cbr\u003e\r\nIn the fourth query, we print \u003cvar\u003e\\(1 \\oplus 3 \u003d 2\\)\u003c/var\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e10 10\r\n0 5 3 4 7 0 0 0 1 0\r\n1 10 7\r\n2 8 9\r\n2 3 6\r\n2 1 6\r\n2 1 10\r\n1 9 4\r\n1 6 1\r\n1 6 3\r\n1 1 7\r\n2 3 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n0\r\n5\r\n3\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\u003c/section\u003e\r\n"}}]}