You are given an array of size N. Distribute the elements of the array into two parts such that the of the of two parts is maximum.
In other words,
Let denote sum of the elements in .
Let denote sum of the elements in .
You need to maximise
Input :
First line contains an integer N, denoting number of elements in array.
Next line contains N integers denoting the array elements.
Output :
Maximum value of .
Constraints :
Note: It is not mandatory to use the code snippet that is provided to you in the editor by default. It is just to make the question more convenient. You can completely remove the default code and submit your solution in the appropriate format.
Maximum is possible when part 1 contains and part 2 contains