Created
          December 2, 2013 01:09 
        
      - 
      
- 
        Save pepet96/7743332 to your computer and use it in GitHub Desktop. 
    Godzilla and Mecha-Godzilla (Short Version)
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import static java.lang.Integer.*; | |
| import static java.lang.Math.*; | |
| import java.util.*; | |
| import java.io.*; | |
| public class godzillarmy { | |
| public static void main(String[] args) throws Throwable{ | |
| BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); | |
| for(int c = 0, C = parseInt(in.readLine().trim()); c++ < C;){ | |
| in.readLine();in.readLine(); | |
| int maxG = 0, maxM = 0; | |
| for(StringTokenizer st = new StringTokenizer(in.readLine()); st.hasMoreTokens(); ) maxG = max(maxG, parseInt(st.nextToken())); | |
| for(StringTokenizer st = new StringTokenizer(in.readLine()); st.hasMoreTokens(); ) maxM = max(maxM, parseInt(st.nextToken())); | |
| System.out.println(maxG>=maxM?"Godzilla":"MechaGodzilla"); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment