#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{ int c=1;
int n[100],N,i;
cin>>N;
for(i=0;i<N;i++)
{
cin>>n[i];
}
for(i=0;i<N;i++)
{
if(n[i] == 1 )
{ int k= i+5;
for(int j=i; j<k;j++)
{
if(n[i]==n[j+1])
{
c = 0;
break;
}
}
}
if(n[i]==0)
{
continue;
}
}
if(c==0)
{
cout<<"No\n";
}
else
{
cout<<"Yes\n";
}
}
return 0;
}
why this code is not accepted as correct answer even everything works absolutely fine ?