{"trustable":false,"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":"\u003csection\u003e\n \u003cp\u003e\u003cb\u003eLa inceput\u003c/b\u003e avem o secventa de numere intregi \u003cvar\u003e\\(A\\)\u003c/var\u003e de lungime \u003cvar\u003e\\(N\\)\u003c/var\u003e.\u003c/p\u003e \n\u003cp\u003e \u003cb\u003eAvem \u003cvar\u003e\\(Q\\)\u003c/var\u003e operatii de efectuat\u003c/b\u003e. Pentru operatia \u003cvar\u003e\\(i\\)\u003c/var\u003e, cunoastem tipul \u003cvar\u003e\\(T_i\\)\u003c/var\u003e, \u003cvar\u003e\\(X_i\\)\u003c/var\u003e, si \u003cvar\u003e\\(Y_i\\)\u003c/var\u003e:\u003c/p\u003e\n \u003cul\u003e\n \u003cli\u003e\u003cvar\u003e\\(T_i \u003d 1\\)\u003c/var\u003e: Inlocuieste \u003cvar\u003e\\(A_{X_i}\\)\u003c/var\u003e cu \u003cvar\u003e\\(A_{X_i} \\oplus Y_i\\)\u003c/var\u003e.\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e: Afiseaza \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\n \u003c/ul\u003e\n \u003cp\u003eIn acest caz, \u003cvar\u003e\\(a \\oplus b\\)\u003c/var\u003e reprezinta rezultatul operatiei pe biti XOR dintre \u003cvar\u003e\\(a\\)\u003c/var\u003e si \u003cvar\u003e\\(b\\)\u003c/var\u003e.\u003c/p\u003e\u003c/var\u003e \n \u003cp\u003e\u003cb\u003eLa sfarsit\u003c/b\u003e trebuie sa fie afisate raspunsurile operatiilor de tip \u003cvar\u003e\\(2\\)\u003c/var\u003e. \n \u003c/details\u003e\n \u003cp\u003e\u003c/p\u003e\n\u003c/section\u003e"}},{"title":"Constraints","value":{"format":"HTML","content":"\u003csection\u003e\n \u003cul\u003e\n \u003cli\u003e\u003cvar\u003e\\(1 \\le N \\le 300000\\)\u003c/var\u003e\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(1 \\le Q \\le 300000\\)\u003c/var\u003e\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(0 \\le A_i \\lt 2^{30}\\)\u003c/var\u003e\u003c/li\u003e\n \u003cli\u003e\u003cvar\u003e\\(T_i\\)\u003c/var\u003e este \u003cvar\u003e\\(1\\)\u003c/var\u003e sau \u003cvar\u003e\\(2\\)\u003c/var\u003e.\u003c/li\u003e\n \u003cli\u003eDaca \u003cvar\u003e\\(T_i \u003d 1\\)\u003c/var\u003e, atunci \u003cvar\u003e\\(1 \\le X_i \\le N\\)\u003c/var\u003e si \u003cvar\u003e\\(0 \\le Y_i \\lt 2^{30}\\)\u003c/var\u003e.\u003c/li\u003e\n \u003cli\u003eDaca \u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e, atunci \u003cvar\u003e\\(1 \\le X_i \\le Y_i \\le N\\)\u003c/var\u003e.\u003c/li\u003e\n \u003cli\u003eToate valorile din input sunt intregi.\u003c/li\u003e\n \u003c/ul\u003e\n\u003c/section\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003csection\u003e\n \u003cp\u003eInput este dat in urmatorul format:\u003c/p\u003e\n \u003cpre\u003e\u003cvar\u003e\\(N\\)\u003c/var\u003e \u003cvar\u003e\\(Q\\)\u003c/var\u003e\n\u003cvar\u003e\\(A_1 \\hspace{7pt} A_2 \\hspace{7pt} A_3 \\hspace{5pt} \\dots \\hspace{5pt} A_N\\)\u003c/var\u003e\n\u003cvar\u003e\\(T_1\\)\u003c/var\u003e \u003cvar\u003e\\(X_1\\)\u003c/var\u003e \u003cvar\u003e\\(Y_1\\)\u003c/var\u003e\n\u003cvar\u003e\\(T_2\\)\u003c/var\u003e \u003cvar\u003e\\(X_2\\)\u003c/var\u003e \u003cvar\u003e\\(Y_2\\)\u003c/var\u003e\n\u003cvar\u003e\\(T_3\\)\u003c/var\u003e \u003cvar\u003e\\(X_3\\)\u003c/var\u003e \u003cvar\u003e\\(Y_3\\)\u003c/var\u003e\n\u003cvar\u003e\\(\\hspace{22pt} \\vdots\\)\u003c/var\u003e\n\u003cvar\u003e\\(T_Q\\)\u003c/var\u003e \u003cvar\u003e\\(X_Q\\)\u003c/var\u003e \u003cvar\u003e\\(Y_Q\\)\u003c/var\u003e\n\u003c/pre\u003e\n\u003c/section\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003csection\u003e\n \u003cp\u003ePentru fiecare query \u003cvar\u003e\\(T_i \u003d 2\\)\u003c/var\u003e in ordinea data, afiseaza raspunsul pe o linie separata.\u003c/p\u003e\n\u003c/section\u003e"}},{"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\n1 2 3\n2 1 3\n2 2 3\n1 2 3\n2 2 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\n1\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n \u003cp\u003eLa prima operatie, afisam \u003cvar\u003e\\(1 \\oplus 2 \\oplus 3 \u003d 0\\)\u003c/var\u003e.\u003cbr\u003e La a doua operatie, afisam \u003cvar\u003e\\(2 \\oplus 3 \u003d 1\\)\u003c/var\u003e.\u003cbr\u003e La a treia operatie, inlocuim \u003cvar\u003e\\(A_2\\)\u003c/var\u003e cu \u003cvar\u003e\\(2 \\oplus 3 \u003d 1\\)\u003c/var\u003e.\u003cbr\u003e La a patra operatie, afisam \u003cvar\u003e\\(1 \\oplus 3 \u003d 2\\)\u003c/var\u003e.\u003c/p\u003e\n\u003c/section\u003e"}},{"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\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\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n0\n5\n3\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003csection\u003e\n\u003c/section\u003e\u003csection\u003e\n\u003c/section\u003e"}}]}