## Prefix Sums solution codechef

Prefix Sums solution codechef For a positive, eveneven integer NN, we call a pair of arrays AA and BB to be interesting if they satisfy the following conditions : |A|=|B|=N/2|A|=|B|=N/2 i.e. the length of array AA is equal to the length of array BB. Each integer from 11 to NN occurs exactly once in exactly one of the arrays. The ithith prefix sum of AA is not equal to ithith prefix sum of BB for all 1≤i≤N/2−11≤i≤N/2−1. Formally, ∑j=1iAj≠∑j=1iBj∑j=1iAj≠∑j=1iBj for all 1≤i≤N/2−11≤i≤N/2−1 Sum of … Read more