最大异或对 The XOR Largest Pair

Luogu
IDLGP10471
Time1000ms
Memory512MB
DifficultyP3
字典树 Trie
给定 $N$ 个整数 $A_1.A_2, \cdots, A_N$ 中选出两个进行异或计算,得到的结果最大是多少? ## Input 第一行一个整数 $N$,第二行 $N$ 个整数 $A_1.A_2, \cdots, A_N$。 ## Output 一个整数表示答案。 [samples] ## Note 对于所有测试数据,$1 \le N \le 10^5$,保证 $0\le A_i<2^{31}$。
Samples
Input #1
3
1 2 3
Output #1
3
API Response (JSON)
{
  "problem": {
    "name": "最大异或对 The XOR Largest Pair",
    "description": {
      "content": "给定 $N$ 个整数 $A_1.A_2, \\cdots, A_N$ 中选出两个进行异或计算,得到的结果最大是多少?",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P3"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGP10471"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "给定 $N$ 个整数 $A_1.A_2, \\cdots, A_N$ 中选出两个进行异或计算,得到的结果最大是多少?\n\n## Input\n\n第一行一个整数 $N$,第二行 $N$ 个整数 $A_1.A_2, \\cdots, A_N$。\n\n## Output\n\n一个整数表示答案。\n\n[samples]\n\n## Note\n\n对于所有测试数据,$1 \\le N \\le 10^5$,保证 $0\\le A_i...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments