Chef is given an array AA consisting of NN positive integers. Chef shuffles the array AA and creates a new array BB of length NN, where Bi=(Ai+i)mod2Bi=(Ai+i)mod2, for each i(1≤i≤N)i(1≤i≤N). Find the maximum possible sum of integers of the array BB, if Chef shuffles the array AA optimally. 100% correct solution

Shuffling Parities solution codechef Chef is given an array AA consisting of NN positive integers. Chef shuffles the array AA and creates a new array BB of length NN, where Bi=(Ai+i)mod2Bi=(Ai+i)mod2, for each i(1≤i≤N)i(1≤i≤N). Find the maximum possible sum of integers of the array BB, if Chef shuffles the array AA optimally. Input Format Shuffling Parities solution codechef The first line of the input contains … Read more