Here’s my code i dont know in which case its failing .

```
#include<iostream>
#include<cstdio>
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
int main()
{
FAST_IO
int T,n,f_n;
cin>>T;
while(T--)
{
int f_count=0;
cin>>n;
int orig_a[n];
for(int i=0;i<n;i++)
cin>>orig_a[i];
cin>>f_n;
int f_a[f_n];
for(int i=0;i<f_n;i++)
cin>>f_a[i];
for(int i=0;i<n;i++)
{
f_count=0;
if(f_a[0]==orig_a[i])
{
int temp=i+1;
f_count++;
for(int j=1;j<f_n;j++)
{
if(f_a[j]==orig_a[temp++])
f_count++;
else
break;
}
}
if(f_count==f_n)
break;
}
if(f_count==f_n)
cout<<"Yes"<<"\n";
else
cout<<"No"<<"\n";
}
return 0;
}
```