To give you the number of n (n<=100) to find out a number of numbers to make them different or and maximum
Idea: Gaussian-if the elimination of the elimination of the element after the cut into a number of independent line vectors, they will be different or up good
#include <cstdio>
#include <string.h>
#include <iostream>
#include <algorithm>
#define MAXN 3000
#define LL __int64
using namespace Std;
LL BIN[MAXN],A[MAXN];
int main ()
{
int n;
scanf ("%d", &n);
for (int i=1;i<=n;i++) scanf ("%i64d", &a[i]);
for (int i=1;i<=61;i++) bin[i]= (1ll<< (i-1));
int now=0;
for (int i=61;i>=1;i--)
{
int idx=now+1;
while ((A[idx]&bin[i]) ==0 && idx<=n) idx++;
if (idx==n+1) continue;
Swap (a[idx],a[now+1]);
now++;
for (int j=1;j<=n;j++) if ((A[j]&bin[i])!=0 && now!=j) A[j]^=a[now];
}
LL ans=0;
for (int i=1;i<=n;i++) ans^=a[i];
printf ("%i64d\n", ans);
return 0;
}
SGU 275 to XOR or not to XOR "maximum XOR and Gaussian elimination"