Not passing all test cases

#include<bits/stdc++.h>
using namespace std;

bool issorted(int a[],int n){
if(n==0 || n==1)
return true;

if(a[0]<a[1] && issorted(a+1,n-1)){
	return true;
}
return false;

}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
std::boolalpha;
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
cout<<boolalpha<<issorted(a,n)<<endl;
return 0;
}