link for the question:
Below code is giving sigsegv error for last case dont know why?
Below is the code:
#include<iostream>
#include<cstdio>
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
int main()
{
FAST_IO
unsigned long long int T,N,R,X,Y;
cin>>T;
while(T--)
{
cin>>N>>R>>X>>Y;
#if 1
unsigned long long int A[N]={0},x,y,count_zero=0;
for(int i=0;i<X;i++)
{
cin>>x;
A[x-1]++;
}
for(int i=0;i<Y;i++)
{
cin>>y;
A[y-1]++;
}
for(int i=0;i<N;i++)
{
if(A[i]==0)
count_zero++;
}
if(count_zero>R)
cout<<R<<"\n";
else
cout<<count_zero<<"\n";
#endif
}
return 0;
}