What is wrong in this code ?

```
#include<iostream>
#include<algorithm>
#define ll long long int
#include<cmath>
using namespace std;
ll power(ll x, ll y)
{
if (y == 0)
return 1;
else if (y % 2 == 0)
return power(x, y / 2) * power(x, y / 2);
else
return x * power(x, y / 2) * power(x, y / 2);
}
main()
{
ll t;
cin>>t;
while(t--)
{
ll n;
cin>>n;
ll a[n];
ll x[n];
ll ex[n];
ll ans;
x[0]=0;
ex[0]=0;
ans=0;
for(ll i=0;i<n;i++)
{
cin>>a[i];
if(i>0)
{
if(a[i]<a[i-1])
{
ans=0;
break;
}
ll temp=a[i]&a[i-1];
// cout<<temp<<endl;
ll c=0;
while(temp!=0)
{
c+=(temp%2);
temp=temp/2;
}
ex[i]=c;
if(c>=1 && ans==0)
ans=1;
if(ex[i]!=0)
{
ans=ans*((ll)(power(2,ex[i]))%1000000007);
}
ans=ans%1000000007;
}
}
if(n==1)
ans=0;
cout<<ans<<endl;
}
}
```