You are given with an array of size .An element is said to be charged if its value() is greater than or equal to . is the total number of subsets of array , that consist of element .
Total charge value of the array is defined as summation of all charged elements present in the array mod .
Your task is to output the total charge value of the given array .
Total charge value of the array is defined as summation of all charged elements present in the array mod .
Your task is to output the total charge value of the given array .
INPUT FORMAT:
The first line of input contains number of test cases .
The first line of each test case consists of , the size of the array.
Next line contains space-separated integers corresponding to each element .
The first line of each test case consists of , the size of the array.
Next line contains space-separated integers corresponding to each element .
OUTPUT FORMAT:
For each test case, output a single number corresponding to total charge value of the given array.
Charged Up Array - HackerEarth Problem Solution
Post a Comment