Help me in solving AOJ17 problem

My issue

My code

import java.util.*;

class Codechef
{
	public static void main (String[] args)
	{
		Scanner read = new Scanner(System.in);
		int t = read.nextInt();
		for(int i=0; i<t; i++)
		{
		    ArrayList<Integer> a = new ArrayList<Integer>();
		    int n = read.nextInt();
		    for(int j=1; j<=n; j++){
		        int ele = read.nextInt();
    		    a.add(ele);
		    }
		    
		    ArrayList<Integer> b = new ArrayList<Integer>();
		    for(int k=1; k<=n; k++){
		        int ele = read.nextInt();
    		    b.add(ele);
		    }
		    // Update the code below to solve this problem
            int gre=Collections.max(a);
            gre=0;
            if(a.contains(gre))
		    
		}
	}
}

Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone

Can anyone describe me that why this problem did not considered the greater than element of the size of the array list . And kindly share the code of this problem if possible…

please help me out :slight_smile:

Please help me out …:slight_smile: