Help me in solving AOJ08 problem

My issue

how i can sort the array in even and odd array

My code

import java.util.*;

class Codechef
{
	public static void main (String[] args)
	{
		Scanner read = new Scanner(System.in);
		
		int t = read.nextInt();
		int ele;
		for(int i=0; i<t; i++)
		{
    		int n = 10;
    		ArrayList<Integer> a = new ArrayList<Integer>();
    		for(int j=0; j<n; j++){
    		    ele = read.nextInt();
    		    a.add(ele);
    		}
    		

		}
	}
}

Learning course: Beginner DSA in Java
Problem Link: CodeChef: Practical coding for everyone

@tiwari84449277
just iterate through the array and if the index is odd then add score to the player one or else add score to the player two.
Then compare their score and then print the result.