{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e .sampledata { font-family: \"Courier New\", Courier, monospace; white-space: pre; }\u003c/style\u003e\u003cdiv\u003e\n \u003cspan style\u003d\"font-size: 12pt; font-family: arial, verdana, helvetica, sans-serif; text-indent: 23.25pt;\"\u003e你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作:\u003c/span\u003e\n\u003c/div\u003e \n\u003cp class\u003d\"MsoNormal\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; font-size: 18px; margin: 0cm 0cm 0pt; text-indent: 23.25pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u0026nbsp;\n \u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \n\u003ctable class\u003d\"MsoNormalTable\" cellspacing\u003d\"0\" cellpadding\u003d\"0\" border\u003d\"1\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border: medium none; border-collapse: collapse;\"\u003e \n \u003ctbody\u003e \n \u003ctr\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border: 1pt solid black; padding: 0cm 5.4pt; width: 142pt; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e命令\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: black black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; border-top-width: 1pt; border-top-style: solid; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e参数限制\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: black black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; border-top-width: 1pt; border-top-style: solid; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e内容\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003c/tr\u003e \n \u003ctr\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black; border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; border-left-width: 1pt; border-left-style: solid; width: 142pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e1 x y A\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e1\u0026lt;\u003dx,y\u0026lt;\u003dN\u003c/span\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e,\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003eA\u003c/span\u003e是正整数\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e将格子\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003ex,y\u003c/span\u003e里的数字加上\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003eA\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003c/tr\u003e \n \u003ctr\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black; border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; border-left-width: 1pt; border-left-style: solid; width: 142pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e2 x\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e1\u003c/sub\u003e\u0026nbsp;y\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e1\u003c/sub\u003e\u0026nbsp;x\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e2\u003c/sub\u003e\u0026nbsp;y\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e2\u003c/sub\u003e\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e1\u0026lt;\u003dx\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e1\u003c/sub\u003e\u0026lt;\u003d x\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e2\u003c/sub\u003e\u0026lt;\u003dN\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e1\u0026lt;\u003dy\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e1\u003c/sub\u003e\u0026lt;\u003d y\u003csub style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e2\u003c/sub\u003e\u0026lt;\u003dN\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e输出\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003ex\u003csub\u003e1\u003c/sub\u003e\u0026nbsp;y\u003csub\u003e1\u003c/sub\u003e\u0026nbsp;x\u003csub\u003e2\u003c/sub\u003e\u0026nbsp;y\u003csub\u003e2\u003c/sub\u003e\u003c/span\u003e这个矩形内的数字和\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003c/tr\u003e \n \u003ctr\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black; border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; border-left-width: 1pt; border-left-style: solid; width: 142pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e3\n \u003co:p style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e无\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003ctd valign\u003d\"top\" width\u003d\"189\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif; border-color: rgb(236, 233, 216) black black rgb(236, 233, 216); border-right-width: 1pt; border-right-style: solid; padding: 0cm 5.4pt; width: 142.05pt; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;\"\u003e \u003cp class\u003d\"MsoNormal\" style\u003d\"margin: 0cm 0cm 0pt;\"\u003e\u003cspan style\u003d\"font-family: 宋体; font-size: 12pt;\"\u003e终止程序\u003cspan lang\u003d\"EN-US\" style\u003d\"font-family: arial, verdana, helvetica, sans-serif;\"\u003e\n \u003co:p\u003e\u003c/o:p\u003e\u003c/span\u003e\u003c/span\u003e\u003c/p\u003e \u003c/td\u003e \n \u003c/tr\u003e \n \u003c/tbody\u003e \n\u003c/table\u003e \n\u003cdiv\u003e\u003c/div\u003e \n\u003cdiv\u003e\u003c/div\u003e \n\u003cp\u003e\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv\u003e\n 输入文件第一行一个正整数N。\n\u003c/div\u003e \n\u003cdiv\u003e \n \u003cdiv\u003e\n 接下来每行一个操作。每条命令除第一个数字之外,\n \u003c/div\u003e \n \u003cdiv\u003e\n 均要异或上一次输出的答案last_ans,初始时last_ans\u003d0。\n \u003c/div\u003e \n \u003cdiv\u003e\u003c/div\u003e \n\u003c/div\u003e \n\u003cp\u003e\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv\u003e\n 对于每个2操作,输出一个对应的答案。\n\u003c/div\u003e \n\u003cp\u003e\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cspan class\u003dsampledata\u003e4\r\n1 2 3 3\r\n2 1 1 3 3\r\n1 1 1 1\r\n2 1 1 0 7\r\n3\u003c/span\u003e\u003c/div\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cspan class\u003dsampledata\u003e3\r\n5\u003c/span\u003e\u003c/div\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cp\u003e\u003c/p\u003e\n\u003cdiv\u003e\n 数据规模和约定\n\u003c/div\u003e\n\u003cbr\u003e \n\u003cdiv\u003e\n 1\u0026lt;\u003dN\u0026lt;\u003d500000,操作数不超过200000个,内存限制20M,保证答案在int范围内并且解码之后数据仍合法。\n\u003c/div\u003e\n\u003cbr\u003e \n\u003cdiv\u003e\n 样例解释见OJ2683\n\u003c/div\u003e\n\u003cbr\u003e \n\u003cdiv\u003e\u003c/div\u003e\n\u003cbr\u003e \n\u003cdiv\u003e\n 新加数据一组,但未重测----2015.05.24\n\u003c/div\u003e\n\u003cbr\u003e \n\u003cdiv\u003e\u003c/div\u003e\n\u003cbr\u003e \n\u003cp\u003e\u003c/p\u003e\n\u003cp\u003e\u003c/p\u003e"}}]}