Why time limit?

#include
using namespace std;
int main() {
int n;
cin>>n;
int a[1000000000]={0};
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int itr=0;itr<=n-2;itr++){
if(a[itr]<a[itr +1]){
cout<<“true”;
}else if(a[itr]>a[itr+1]){
cout<<“true”;
}
}
return 0;
}

hey @neelrai906 the error isnt TLE it is SIGSEGV or MLE, because you are trying to allocate array of size 10^9 while the maximum size allowed is of 10^6. please decrease the size of array.

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.

hi @neelrai906 have you re-opened this doubt?

sorry done by mistake

@neelrai906 please close it now