sir it is showing run tie error. sir please help
#include
using namespace std;
int p;
int t;
int r;
int main()
{
int n;
cin>>n;
int a[n];
int b=0;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int h=0;h<n;h++)
{
b=b^a[h];
}
int d=b;
int i=0;
while(d!=0)
{
int x=d&1;
d=d>>1;
{
if(x==1)
{
break;
}
}
i++;
t=i;
}
int m=0;
int c[1000];
for(int l=0;l<n;l++)
{
int mask=1<<t;
int g=a[l]&mask;
if(g>0)
{
c[m]=a[l];
m++;
r=m;
}
}
int s=0;
for(int f=0;f<r;f++)
{
s=s^c[f];
}
for(int e=0;e<n;e++)
{
int z=s^a[e];
if(z==b)
{
p=a[e];
}
}
cout<<s<<" "<<p;
}