Company: Global_logic_4_dec
Difficulty: medium
Odd-Even Game Two players play a game with a list of N integers. They move alternately and player 1 moves first. On the very first move player 1 takes the FIRST number of the list. After that the number taken on the previous move decides where the next number comes from: if the number taken on the previous move was ODD, the next player takes the LAST number of the list as it stands now; if the number taken on the previous move was EVEN, the next player takes the FIRST number of the list as it stands now. The number taken is removed from the list, so the game ends after exactly N moves. Each player's score is the sum of the numbers that player took. The winner is the player with the higher score. Print the winning player's score. If the two scores are equal the game is a draw -- print 0 . Input Format Line 1 contains a single integer N , the size of the list. Line 2 contains N space separated integers, the elements of A . Output Format Print a single integer: the score of the