I am getting a sigsegv error in forgotten language problem of September Cook-off and I am unable to figure out where I am doing the mistake
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int t,n,k,i,j,l,cnt,s;
cin>>t;
string name[200];
string match[200];
while(t--)
{
cin>>n>>k;
for(i=0;i<n;i++)
cin>>name[i];
s=0;
for(i=0;i<k;i++)
{
cin>>j;
for(l=0;l<j;l++){
cin>>match[s];
s++;
}
}
for(i=0;i<n;i++)
{
cnt=0;
for(l=0;l<=s;l++)
{
if(name[i]==match[l])
{
cout<<"YES ";cnt++;
break;
}
}
if(cnt==0)
cout<<"NO ";
}
cout<<"\n";
}
return 0;
}