fork download
  1. #include<cstdio>
  2. #include<algorithm>
  3.  
  4. using namespace std ;
  5. #define MAX 10002
  6.  
  7. int main ()
  8. {
  9. int t , arr1[MAX] , arr2[MAX] , i , j , n , m ;
  10. scanf ("%d",&t) ;
  11. while (t--)
  12. {
  13. scanf ("\n") ;
  14. scanf ("%d %d",&n,&m) ;
  15. for (i= 0 ; i<n ; i++)
  16. scanf ("%d",&arr1[i]) ;
  17. for (j = 0 ; j<m ; j++)
  18. scanf ("%d",&arr2[j]) ;
  19. sort (arr1 , arr1+n) ;
  20. sort (arr2 , arr2+m) ;
  21.  
  22. i = 0 ; j = 0 ;
  23. while (1)
  24. {
  25. if (arr1[i] >= arr2[j])
  26. j++ ;
  27. else if (arr1[i] < arr2[j])
  28. i++ ;
  29. if (i == n )
  30. {
  31. printf ("MechaGodzilla
  32.  
  33. \n") ;
  34. break ;
  35. }
  36. if (j == m )
  37. {
  38. printf ("Godzilla\n") ;
  39. break ;
  40. }
  41.  
  42. }
  43.  
  44. if (i != n && j!= n)
  45. printf ("unpredictable\n") ;
  46.  
  47.  
  48. }
  49. return 0 ;
  50. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:31:13: warning: missing terminating " character
     printf ("MechaGodzilla
             ^
prog.cpp:31:5: error: missing terminating " character
     printf ("MechaGodzilla
     ^
prog.cpp:33:1: error: stray '\' in program
 \n")  ; 
 ^
prog.cpp:33:3: warning: missing terminating " character
 \n")  ; 
   ^
prog.cpp:33:1: error: missing terminating " character
 \n")  ; 
 ^
prog.cpp: In function 'int main()':
prog.cpp:34:6: error: expected ')' before 'break'
      break ; 
      ^
stdout
Standard output is empty