Given an array of integers A of size N.
Value of a subset of array A is defined as sum of squares of all numbers in that subset.
Calculate and return Sum of values of all possible non-empty subsets of array A % (10^9 + 7).
The first and only argument given is the integer array A.
Calculate and return Sum of values of all possible non-empty subsets of array A% (10^9+ 7).
1 <= N <= 10^5 1 <= A[i] < 2^31
Input 1: A = [3, 7] Output 1: 116 Explaination 1: Value (  ) = 9 value (  ) = 49 value ( [3, 7] ) = 9 + 49 = 58 answer = (9 + 49 + 58) % 1000000007 = 116 Input 2: A =  Output 2: 16
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.