Cooling Pies . Why wrong answer ?

#include<stdio.h>
#include<stdlib.h>

int main()
{
int t;
scanf("%d",&t);

int a[100],b[100];

if(t<=30)
{    
while(t--)
{
          int i,n;
          scanf("%d",&n);
          
          
          for( i = 0 ; i < n ; i++)
          {
               scanf("%d",&a[i]);
            //   scanf("%d",&b[i]);
          }
          
          for( i = 0 ; i < n ; i++)
          {
               scanf("%d",&b[i]);
          }
          
          int max=-1;
          
          for( i = 0; i < n ; i++)
           {
               if(max < b[i])
               max=b[i];
           }
           
           int count=0;
           
           for( i = 0; i < n; i++)
           {
                if( max >= a[i] )
                count++;
           }
           
           printf("%d",count);
}
}

else
exit(0);

getchar();
system("pause");
return 0;

}

Got the answer . Sorry guys . Admin delete this question

yupp you understood the problem wrong i guess!