1.暴力做法 for i: 1-n for j: i-n 异或,取最大值。 2.如何优化 从高到低,尽量依次找与之前不同的数(异或) #include<iostream> using namespace std; const int N = 1e5 + 10, M = 31 * N; int a[N], son[M][2