You are given an array of size . Your task is to replace any one element of the array with its corresponding square.
Find the maximum sum of subarrays after performing the task exactly once.
Input format
Output format
Constraints
Square of -4 is 16. The array now becomes : {1,16,3}. Sum of subarray A[1,3] is 19.