给定一个数组 $$$a$$$,其中包含 $$$n$$$ 非负整数。
子数组 $$$a_l, a_{l+1}, \ldots, a_r$$$ (对于任意 $$$l \leq r$$$)的麻木度定义为 $$$$$$\max(a_l, a_{l+1}, \ldots, a_r) \oplus (a_l \oplus a_{l+1} \oplus \ldots \oplus a_r),$$$$$$ 其中$$$\oplus$$$ 表示按位异或运算。
找到所有子数组的最大麻木度。
输入
每个测试包含多个测试用例。第一行包含测试用例的数量 $$$t$$$ ($$$1 \le t \le 1000$$$)。测试用例的描述如下。
每个测试用例的第一行包含一个整数 $$$n$$$ ($$$1 \leq n \leq 2 \cdot 10^5$$$)。
每个测试用例的第二行包含 $$$n$$$ 整数 $$$a_1, a_2, \ldots, a_n$$$ ($$$0 \leq a_i \leq 10^9$$$)。
保证所有测试用例的 $$$n$$$ 总和不超过 $$$2 \cdot 10^5$$$。
输出
对于每个测试用例,打印一个整数 - 给定数组的所有子数组的最大麻木度。
示例
输入 #1
2 5 1 2 3 4 5 3 10 47 52
输出 #1
7 47
注意
对于第一个测试用例,对于子数组 $$$[3, 4, 5]$$$,其最大值为 $$$5$$$。因此,它的麻木度是 $$$3 \oplus 4 \oplus 5 \oplus 5$$$ = $$$7$$$。这是这个数组中可能的最大麻木度。
在第二个测试用例中,子数组 $$$[47, 52]$$$ 提供了最大的麻木度。