Why is my code showing a runtime error?

I have done a codechef excercise named HACKFULU.
The code got succesfully executed on my pc but showing a runtime error on Codechef.
Please helpmeout

#include<stdio.h>
int t;
void propseq(int N,int s,int k,int m,int M);
void main()
{
int N,s,k,m,M,l=0;
scanf("%d",&t);
do
{
scanf("%d%d%d%d%d",&N,&s,&k,&m,&M);
propseq(N,s,k,m,M);
l++;
}while(l!=t);
}

void propseq(int N,int s,int k,int m,int M)
{
int a[10],b[10],med,med1,i,j,h,z=0;
if(m>M&&k==0)
{
j=-1;
goto l1;
}
for(i=0;i<N;i++)
{

if(i==N-1)
{
	if(s<M)
	{
	a*=s;
	break;
	}
	else
	{
	j=-1;
	goto l1;
	}
}
if(s>=m)
{
	a*=m;
	s=s-m;
}
else
{
	j=-1;
	goto l1;
}

}
if(N%2==0)
{
med=((N/2)+(N/2)-1)/2;
}
else
{
med=(N-1)/2;
}
for(h=0;h<N;h++)
{
if(h==(N%k)||h==k)
{
continue;
}
else
{
b[h]=a[h];
z++;
}
}
med1=N-2/2;
if(a[med]==b[med1])
{
j=-1;
goto l1;
}
else
{

goto l1;

}

l1:
if(j==-1)
{
printf("%d",j);
}
else
{
for(h=0;h<N;h++)
{
printf("%d ",a[h]);
}
}

}

#include<stdio.h>
#include<conio.h>
int t;
void propseq(int N,int s,int k,int m,int M);
void main()
{
int N,s,k,m,M,l=0;
clrscr();
scanf("%d",&t);
do
{
scanf("%d%d%d%d%d",&N,&s,&k,&m,&M);
propseq(N,s,k,m,M);
l++;
}while(l!=t);
getch();
}

void propseq(int N,int s,int k,int m,int M)
{
int a[10],b[10],med,med1,i,j,h,z=0;
if(m>M&&k==0)
{
j=-1;
goto l1;
}
for(i=0;i<N;i++)
{

if(i==N-1)
{
	if(s<M)
	{
	a*=s;
	break;
	}
	else
	{
	j=-1;
	goto l1;
	}
}
if(s>=m)
{
	a*=m;
	s=s-m;
}
else
{
	j=-1;
	goto l1;
}

}
if(N%2==0)
{
med=((N/2)+(N/2)-1)/2;
}
else
{
med=(N-1)/2;
}
for(h=0;h<N;h++)
{
if(h==(N%k)||h==k)
{
continue;
}
else
{
b[h]=a[h];
z++;
}
}
med1=N-2/2;
if(a[med]==b[med1])
{
j=-1;
goto l1;
}
else
{

goto l1;

}

l1:
if(j==-1)
{
printf("%d",j);
}
else
{
for(h=0;h<N;h++)
{
printf("%d ",a[h]);
}
}

}