Mergesort i have error in submit code cant understand the error

#include
using namespace std;
void merge(int *a,int s,int e){
int mid=(s+e)/2;
int i=s;
int j=mid+1;
int k=s;
int temp[100];
while(i<=mid&&j<=e){
if(a[i]<a[j]){
temp[k++]=a[i++];
}
else{
temp[k++]=a[j++];
}
}
while(i<=mid){
temp[k++]=a[i++];
}
while(j<=e){
temp[k++]=a[j++];
}
for(int i=s;i<=e;i++){
a[i]=temp[i];
}
}
void merge_sort(int a[],int s,int e){
if(s>=e){
return;
}
int mid=(s+e)/2;
merge_sort(a,s,mid);
merge_sort(a,mid+1,e);
merge(a,s,e);
}
int main() {
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
merge_sort(a,0,n-1);
for(int i=0;i<n;i++){
cout<<a[i];
}
return 0;
}

this he error TESTCASE # 1 : run-error (Time: 0.09 s)
TESTCASE # 2 : run-error (Time: 0.1 s)
TESTCASE # 3 : run-error (Time: 0.1 s)

hey @Anoushka_1805, constraints are high in the question, please change all int to long long int.

#include
using namespace std;
void merge(long long int *a,long long int s,long long int e){
long long int mid=(s+e)/2;
long long int i=s;
long long int j=mid+1;
long long int k=s;
long long int temp[100];
while(i<=mid&&j<=e){
if(a[i]<a[j]){
temp[k++]=a[i++];
}
else{
temp[k++]=a[j++];
}
}
while(i<=mid){
temp[k++]=a[i++];
}
while(j<=e){
temp[k++]=a[j++];
}
for(int i=s;i<=e;i++){
a[i]=temp[i];
}
}
void merge_sort(long long int a[],long long int s, long long int e){
if(s>=e){
return;
}
int mid=(s+e)/2;
merge_sort(a,s,mid);
merge_sort(a,mid+1,e);
merge(a,s,e);
}
int main() {
long long int n;
cin>>n;
long long int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
merge_sort(a,0,n-1);
for(int i=0;i<n;i++){
cout<<a[i];
}
return 0;
}

this is still shoowing error

hey @Anoushka_1805, can you share me this saved in coding blocks ide.

@Anoushka_1805 hey anoushka increase the size of temp array this causing run error

hey @Anoushka_1805,
in line no 31,40,44 change int to long long int.
add space while printing the result in line no 45
make the size of temp 100000
here is your updated code

this code is stil giving run time error

hey @Anoushka_1805, I have run your code to this https://hack.codingblocks.com/contests/c/253/395.
It is passing all the testcases.