Help me in solving CHEFSQ problem

My issue

it isn’t taking the input and is giving an EOF error what should I do?

Problem Link: Chef and his Sequence Practice Coding Problem - CodeChef

@sreejithach
here plzz refer my c++ code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    int n;
	    cin>>n;
	    int a[n];
	    for(int i=0;i<n;i++)
	    {
	        cin>>a[i];
	    }
	    int m;
	    cin>>m;
	    int b[m];
	    for(int i=0;i<m;i++)
	    {
	        cin>>b[i];
	    }
	    int i=0,j=0;
	    while(i<n)
	    {
	        if(a[i]==b[j])
	        {
	            i++;
	            j++;
	        }
	        else
	        i++;
	        if(j==m)
	        break;
	    }
	    if(j==m)
	    cout<<"Yes";
	    else
	    cout<<"No";
	    cout<<endl;
	}

}