396. Partition Equal Subset Sum

0

Medium

Given a non-empty array consisting solely of positive integers, determine if it is possible to divide the array into two subsets such that the sum of elements in both subsets is equal.

Input Format

Enter the number of test cases T

Enter the value of N

Enter the elements of array A[i]

Enter the value of N

Enter the elements of array A[i]

Output Format

Print true or false for each test case, indicating whether the array can be divided into two subsets with equal sums.

Example

Input

1
4
1 5 11 5

Output

true

Constraints

1<=T<=100

1<=N<=100

1<=A[i]<=100

1<=N<=100

1<=A[i]<=100

Loading...

View Submissions

Console