My issue
This is my code it’s showing runtime error on testcase7
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
cin>>t;
while(t--) {
long long int n;
cin>>n;
double l,r;
cin>>l>>r;
double c=1;
bool is_true=true;
long long int a[n];
for(int i=0; i<n; i++) {
cin>>a[i];
}
for(int i=0; i<n-1; i++) {
for(int j=i+1; j<n; j++) {
c=c*(a[i]^a[j]);
}
}
if(c>=l && c<=r) {
cout<<"YES"<<"\n";
} else {
cout<<"NO"<<"\n";
}
}
}
Problem Link: Halloween Array Practice Coding Problem