Maximum bitconic sequence some cases failed

#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–)
{
long long int n;
cin>>n;
long long int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
long long int l[n]={0},r[n]={0};
for(int i=1;i<n;i++)
{
if(a[i]>a[i-1])
r[i]=r[i-1]+1;
else
r[i]=0;
}
for(int i=n-2;i>=0;i–)
{
if(a[i]>a[i+1])
l[i]=l[i+1]+1;
else
l[i]=0;
}
long long int m=0;
for(int i=0;i<n;i++)
{
if(l[i]+r[i]>m)
m=l[i]+r[i];
}
cout<<m+1<<"\n";
}
}

Hello @vibhubhatia0007 you are solving maximum length bitonic subsequence or subarray?
please confirm here:

maximum length subarray

Hello @vibhubhatia0007 please share your complete code by saving it on ide.codingblocks.com .

It’s working now https://ide.codingblocks.com/s/426974

can you tell me what changes did you make

Comparison had to be made for greater than equal to sign, not only greater than sign

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.