Given an array a of length n and an integer k. You must perform the following operation exactly k times: choose two indices i, j and swap**(ai, aj).** Find the maximum possible MSS (maximum subarray sum) after performing the above operation exactly k times. Note: Swapping the same pair again is allowed but useless (a double-swap cancels out). Therefore, performing exactly k swaps is equivalent to at most k useful swaps. Input Format The first line contains an integer, n, denoting the size of array The next line contains an integer, k, denoting the number of swaps. Each line i of the n subsequent lines (where 0 ≤ i Input: 3 0 5 -1 5 Output: 9 how can we solve this problem?? submitted by /u/Intelligent_Tree6918 [link] [comments]