Codechef oct long challenge S10E

what’s wrong with my code-

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

int main() {
int t,n,i,j,good=1;
cin>>t;
while(t–)
{ cin>>n;
int a[n];
for(i=0;i<n;i++)
cin>>a[i];

  for(i=n-1;i>=1;i--)
 { int count=0;
     for(j=i-1;j>=i-5&&j>=0;j--)
  {
    if(a[j]<a[i])
      { count++;
      }
  }if(count==0)
    good++;
} cout<<good<<"\n";   
}
return 0;

}

Your codes fails for repeated prices.
Example:
1
5
4 4 4 4 4

In line 17 of your solution, the operator should be <= as prices same as any of previous five days are also not acceptable.