Why I am not able to pass one test case

#include<bits/stdc++.h>
using namespace std;
bool sorted(long long int a[],long long int n)
{
if(n==1)//base case
{
return true;
}
if(a[0]<a[1]&&sorted(a+1,n-1))
{
return true;
}
else {return false;}
}
int main()
{
long long int n;cin>>n;
long long int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
if(sorted(a,n)){cout<<“true”;}
else{cout<<“false”;}
}

hello chirag,

here it should be a[0] <= a[1]