Problem Description

Read n integers, find maximum value of ai ^ aj over all pairs. Output the maximum XOR.

Input Format

First line n. Second line n integers.

Output Format

One integer maxXor.

Sample Test Case

Input:
4 3 10 5 25
Output:
28

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next