#P10471. 最大异或对 The XOR Largest Pair

最大异或对 The XOR Largest Pair

Problem Description

Given NN integers A1,A2,,ANA_1, A_2, \cdots, A_N, choose two of them to compute their XOR. What is the maximum possible result?

Input Format

The first line contains an integer NN. The second line contains NN integers A1,A2,,ANA_1, A_2, \cdots, A_N.

Output Format

Output one integer representing the answer.

3
1 2 3
3

Hint

For all testdata, 1N1051 \le N \le 10^5, and it is guaranteed that 0Ai<2310 \le A_i < 2^{31}.

Translated by ChatGPT 5