added maximum subarray in C++