Max length bitonic

i am getting wrong ans in the 3 test cases only 2 are passing
#include
using namespace std;
int bitonic(int a[1000],int m)
{
int b[1000],c[1000],i,max=0;
b[0]=1;
c[m-1]=1;
for(i=1;i<m;i++){
b[i]=a[i]>=a[i-1]?b[i-1]+1:1;
}
for(i=m-2;i>=0;i–){
c[i]=a[i]>=a[i+1]?c[i+1]+1:1;
}
max=b[0]+c[0]-1;
for(i=1;i<m;i++){
if(max<(b[i]+c[i]-1)){
max=b[i]+c[i]-1;
}
}
return max;
}
int main() {
int n,m,i,a[1000];
cin>>n;
while(n–){
cin>>m;
for(i=0;i<m;i++){
cin>>a[i];
}
cout<<bitonic(a,m)<<endl;

}
return 0;

}

Hey, i don’t know why your code is not getting accepted.Here is my code it is getting accepted.I have used the same logic and implementation as yours.