# Help me in solving PALIXOR problem || C++

### My code

``````#include <bits/stdc++.h>
using namespace std;

#define fast()  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define             mod 1000000007
#define             ll long long
#define yes         cout << "YES" << endl
#define no          cout << "NO" << endl

vector<int> palindromes;
void palind(){
for(int i=0;i<(1<<15);i++){
vector<int> temp;
int count =0;
int n=i;
while(n){
temp.push_back(n%10);
n/=10;
}
for(int j=0;j<temp.size()/2;j++){
if(temp[j] != temp[temp.size()-j-1]) count =1;
}
if(count == 0) palindromes.push_back(i);
count =0;
}
}

int main() {
int T;
cin >> T;
int N;
palind();
while(T --){
cin >> N;

vector<int> inp;
unordered_map<int,int> m;
int ans=0;

for(int i=0;i<N;i++){
int x;
cin >> x;
inp.push_back(x);
m[x]++;
}

for(int i=0;i<N;i++){
for(int j=0;j<palindromes.size();j++){
ans += m[inp[i]^palindromes[j]];
}
}
cout << ans << endl;
}
return 0;
}

``````

Problem Link: PALIXOR Problem - CodeChef