My issue
what is fault in my code
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
while(n--){
int s,c=0;
cin>>s;
int a[s],b[s];
for(int i=0;i<s;i++){
cin>>a[i];
}
for(int i=0;i<s;i++){
cin>>b[i];
}
for(int i=0;i<s-1;i++){
for(int j=i+1;j<s;j++){
if(a[i]==a[j] || b[i]==b[j] || a[i]==b[j] || a[j]==b[i]){
c++;
}
}
}
if(c!=0) cout<<c<<endl;
else cout<<1<<endl;
}
return 0;
}
Problem Link: Airport Management Practice Coding Problem