cooling pies showing wrng ans but working properly on my pc

= #include<stdio.h>
int main()
{
int t,n,a[30],b[30],c=0,i,j;
scanf("%d",&t);
if(t<=30)
{
scanf("%d",&n);
if(n<=30)
{
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
scanf("%d",&b[i]);
for(i=0;i<n;i++)
{
int loc,k=0;
for(j=0;j<n;j++){
if(a[i]<=b[j])
{
if(k==0){
loc=j;
c++;
k++;
}
else
if(b[loc]>b[j])
loc=j;
}
}
if(k!=0)
b[loc]=0;
}
printf("%d\n",c);
}
}
return 0;
}

hey , well you are not looping t

as in you are not looping into testcases, your programs run on only one test case that is first one

now also its showing wrong ans
i have made changes of test cases…