SP9367 SFLIP - Segment Flip

Description

You are given N number a $ _{1} $ , a $ _{2} $ , ... , a $ _{N} $ . In a _segment flip_, you can pick a contiguous segment a $ _{i} $ , a $ _{i+1} $ , ... , a $ _{j} $ of these numbers, where i

Input Format

The first line contains 2 integers N and K. The next line contains N integers, the initial values of a $ _{1} $ , a $ _{2} $ , ... , a $ _{N} $ .

Output Format

A single integer denoting the maximum possible sum of the final array.