Getting wrong answer

#include
using namespace std;
int main() {
int t;
cin>>t;
for(int k=0;k<t;k++){
int n;
cin>>n;
int arr[n],inc[n],dec[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
inc[0]=1;
dec[n-1]=1;
for(int i=1;i<n;i++){
if(arr[i]>=arr[i-1])
inc[i]=inc[i-1]+1;
else
inc[i]=1;
}
for(int i=n-2;i>=0;iā€“) {
if(arr[i]>=arr[i+1])
dec[i]=dec[i+1]+1;
else dec[i]=1;
}
int incmax=0,decmax=0;
for(int i=0;i<n;i++){
if(inc[i]>incmax)
incmax=inc[i];
if(dec[i]>decmax)
decmax=dec[i];
}
int length=incmax+decmax-1;
cout<<length<<endl;
}
return 0;
}