For this Question: You are given an array A of N integers. Determine the minimum value of the following expression for all i, j valid : (A<sub>i</sub> and A<sub>j</sub>) xor (A<sub>i</sub> or A<sub>j</sub>), where i &ne; j.First line: A single integer T denoting the number of test cases
For each test case:
<ul style="list- style- type:disc"><li>First line contains a single integer N, denoting the size of the array</li><li>Second line contains N space- separated integers A<sub>1</sub>, A<sub>2</sub>,. , A<sub>n</sub></li></ul>
<b>Constraints</b>
1 &le; T &le; 10<sup>3</sup>
1 &le; N &le; 10<sup>5</sup>
0 &le; A<sub>i</sub> &le; 10<sup>9</sup>
Note: Sum of N overall test cases does not exceed 10<sup>6</sup>For each test case, print a single line containing one integer that represents the minimum value of the given expressionSample Input
2
5
1 2 3 4 5
3
2 4 7
Sample Output
1
3
Explanation
For test case #1, we can select elements 2 and 3, the value of the expression is (2 and 3) xor (2 or 3) = 1, which is the minimum possible value. Another possible pair is 4 and 5.
For test case #2, we can select elements 4 and 7, the value of the expression is (4 and 7) xor (4 or 7) = 3, which is the minimum possible value., I have written this Solution Code: 
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template <class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 2351
#endif

#define int long long

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l = LLONG_MIN, long long r = LLONG_MAX) {
    uniform_int_distribution<int64_t> generator(l, r);
    return generator(rng);
}

void solve() {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());

    int ans = INT_MAX;

    for (int i = 1; i < n; i++) {
        ans = min(ans, ((a[i] | a[i - 1]) ^ (a[i] & a[i - 1])));
    }

    cout << ans << "\n";
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    auto start = std::chrono::high_resolution_clock::now();

    int tt;
    cin >> tt;
    while (tt--) {
        solve();
    }

    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);
    cerr << "Time taken : " << ((long double)duration.count()) / ((long double)1e9) << "s " << endl;
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?