#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,n;
cin>>t;
for(int i=1;i<=t;i++)
{
int c=0;int C[t]={};
cin>>n;
int P[n]={};int G[n]={};
for(int j=0;j<n;j++)
{
cin>>P[j];
}
for(int k=0;k<n;k++)
{
int asn=1;int b=5;
if(k!=0)
{
if(k<5)
{
for(int l=0;l<k;l++)
{
if(P[l]<P[k])
{
asn*=0;
}
}
}
else
{
while(b>0)
{
if(P[k-b]<P[k])
{
asn*=0;
}
b--;
}
}
}
G[k]=asn;
}
for(int f=0;f<n;f++)
{
if(G[f]==1)
{
c++;
}
}
cout<<c<<"\n";
}
}
Can anyone please help me in finding the SIGTSTP error in this code.In my PC this program works fine but gives a run-time error while compiling in Codechef's online IDE. The link to the problem is https://www.codechef.com/OCT19B/problems/S10E