SIGSEGV Error in Forgotten Language problem

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;
     }

See the constraints. K,L <=50
And length of each string is 5.

Hence your “match” array must be of size 50 * 50 * 5.

Here is your accepted solution with the only change as stated above
link

Try reducing the size of the array.It’ll work fine.

//