Getting Runtime error (SIGSEGV) // Not TLE
Sorry about the A[100] thing i copied the unedited version of my code...
Here is my updated code
#include<iostream>
using namespace std;
#include<algorithm>
bool cmp(const int&a, const int &b)
{
if(a>b)
return true;
return false;
}
int main()
{ int A[40000],B[40000],t,i,j,a,b;
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&a,&b);
for(i=0;i<a;++i)
scanf("%d",&A[i]);
for(j=0;j<b;++j)
scanf("%d",&B[j]);
sort(A,A+a,cmp);
sort(B,B+b,cmp);
if(A[0]>=B[0])
printf("Godzilla\n");
else
printf("MechaGodzilla\n");
}
return 0;
}