one test case is not passing. below is my code -
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
if(n>=130)
{
cout<<"YES"<<endl;
return 0;
}
else
{
bool ans = false;
int arr[n];
for (int i = 0; i < n; i++)
{
cin>>arr[i];
}
sort(arr,arr+n);
for(int i=0;i<n;i++)
{
for(int j=i;j<n;j++)
{
for(int k=j;k<n;k++)
{
int a = arr[i];
int b = arr[j];
int c = arr[k];
int d = a^b^c;
ans = binary_search(arr,arr+n,d);
}
}
}
if(ans)
{
cout<<"YES"<<endl;
}
else
{
cout<<"NO"<<endl;
}
}
return 0;
}