Why this code not passing any of its testcase but compling fine?

#include
using namespace std;
#define ll long long
void merge(lla,ll s,ll e){
ll mid=(s+e)/2;
ll i=s;
ll k=s;
ll j=mid+1;
ll t[100000];
while(i<=mid && j<=e){
if(a[i]<=a[j]){
t[k++]=a[i++];
}
else{
t[k++]=a[j++];
}
}
while(i<=mid){
t[k++]=a[i++];
}
while(j<=e){
t[k++]=a[j++];
}
for(int i=s;i<=e;i++){
a[i]=t[i];
}
}
void mergesort(ll
a,ll s,ll e){
if(s>=e){
return;
}
ll mid=(s+e)/2;
mergesort(a,s,mid);
mergesort(a,mid+1,e);
merge(a,s,e);
}
int main() {
ll n;
cin>>n;
ll a[100000];
for(ll i=0;i<n;i++){
cin>>a[i];
}
mergesort(a,0,n-1);
for(ll i=0;i<n;i++){
cout<<a[i]<<" ";
}
return 0;
}

@Ashu1318
n is upto 200000 whereas your a[] and t[] array have size 100000. Just increase size of a[] and t[] array to 200000. Your code will work fine

@Ashu1318
As i can see you got 100 point. Please mark this doubt as resolved. thanks

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.