COVIDLQ problem

#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 ?

I think in the output yes and no must be all in capitals

2 Likes

Yes and no will be in capital

1 Like

Thanks a lot for considering my problem friends , but even after changing yes or no to capital (YES and NO) , my solution is not accepted , still it shows Wrong Answer while submitting.

Share the link of your latest submission.

1 Like

https://www.codechef.com/viewsolution/31895913

K may result in RE in some cases.

1 Like