For this Question: Given a set of positive integers. Find the maximum xor of a non-empty subset from the given set.The first line contains an integer N denoting the number of elements in the set.
The next line contains N integers denoting the elements of the set.

1 <= N <= 10^5
1 <= Elements of set <= 10^9Print the maximum subset Xor.Sample Input:
3
2 4 5

Sample Output:
7

Explanation:
Subset {2, 5} has the maximum xor

Sample Input:
3
9 8 5

Sample Output:
13

Explanation:
Subset {8, 5} has the maximum xor, I have written this Solution Code: #include "bits/stdc++.h"
using namespace std;
 
#define int long long int
#define ld long double
#define pi pair<int, int>
#define pb push_back
#define fi first
#define se second
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif

const int N = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int a[N];

int maxsubaXor(int n) 
{ 
    int index = 0; 
    for (int i = 31; i >= 0; i--) 
    { 
        int maxInd = index; 
        int maxEle = INT_MIN; 
        for (int j = index; j < n; j++) 
        { 
            if ( (a[j] & (1 << i)) != 0  
                     && a[j] > maxEle ) 
                maxEle = a[j], maxInd = j; 
        } 
        if (maxEle == INT_MIN) 
        continue; 
        swap(a[index], a[maxInd]); 
        maxInd = index; 
        for (int j=0; j<n; j++) 
        { 
            if (j != maxInd && 
               (a[j] & (1 << i)) != 0) 
                a[j] = a[j] ^ a[maxInd]; 
        } 
        index++; 
    } 
    int res = 0; 
    for (int i = 0; i < n; i++) 
        res ^= a[i]; 
    return res; 
} 

void solve(){
	int n;	cin >> n;
	for(int i = 0; i < n; i++)
		cin >> a[i];
	cout << maxsubaXor(n) << endl;
}

void testcases(){
	int tt = 1; 
	//cin >> tt;
	while(tt--){
		solve();
	}
}

signed main() {
	IOS;
		clock_t start = clock();

	testcases();

	cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms" << endl;
	return 0;
}	, In this Programming Language: C++, Now tell me if this Code is compilable or not?