{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e约翰是一家CPU芯片工厂的经理,工厂每天都会生产大量芯片。为了管理大量的产品,每个处理器都有一个序列号。更具体地说,工厂今天生产了$n$个芯片,今天生产的第$i$个芯片的序列号是$s_i$。\u003cbr\u003e\u003cbr\u003e在一天结束时,他会将当天生产的所有芯片打包,然后发送给批发商。更具体地说,他会在包装上写上一个校验和数字,这个校验和定义如下:\u003cbr\u003e$$\\max_{i,j,k} (s_i+s_j) \\oplus s_k$$\u003cbr\u003e其中$i,j,k$是三个介于$1$和$n$之间的\u003cb\u003e不同\u003c/b\u003e整数。而$\\oplus$是按位异或的符号。\u003cbr\u003e\u003cbr\u003e你能帮约翰计算今天的校验和数字吗?\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入的第一行包含一个整数$T$,表示测试用例的总数。\u003cbr\u003e\u003cbr\u003e每个测试用例的第一行是一个整数$n$,表示今天生产的芯片数量。接下来一行有$n$个整数$s_1, s_2, .., s_n$,用单个空格分隔,表示每个芯片的序列号。\u003cbr\u003e\u003cbr\u003e$1 \\le T \\le 1000$\u003cbr\u003e$3 \\le n \\le 1000$\u003cbr\u003e$0 \\le s_i \\le 10^9$\u003cbr\u003e最多有$10$个测试用例,每个测试用例的芯片数量不超过$n \u0026gt; 100$个。"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,请在一行中输出一个整数,表示校验和数字。"}},{"title":"样例","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\u003e2\r\n3\r\n1 2 3\r\n3\r\n100 200 300\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n400\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}